Skip to content

RFC Fix module information when symbol_get is used

Mauro Carvalho Chehab lkml 1 version In review

Get series with b4
b4 am 1173501083.26213.403.camel@localhost

Versions newest first

  1. v1 RFC Latest3 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Add ability to keep track of callers of symbol_(get|put)include/linux/module.h kernel/module.c+5 -46 replies
2/3Update mtd use of symbol_(get|put)drivers/mtd/chips/gen_probe.c+2 -20 replies
3/3Update dvb use of symbol_(get|put)drivers/media/dvb/bt8xx/dst.c drivers/media/dvb/dvb-core/dvb_frontend.c+6 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] Fix module information when symbol_get is used

Hi Rusty,

DVB code uses symbol_get/symbol_put functions at module.c to allow dynamically add frontend modules (responsible for tuning and demodulating the digital signal). The problem is that symbol_get doesn't properly mark the module that requested it.

Trent worked on a fix for this, by using 3 patches. One on module.c, another on mtd driver, and the last one on linux-dvb.

With the patch, lsmod produces output like this:
cx88_dvb 14084 0
or51132 9988 1 cx88_dvb

Without it, this is what you get:
cx88_dvb 14084 0
or51132 9988 1

 drivers/media/dvb/bt8xx/dst.c             |    5 -
 drivers/media/dvb/dvb-core/dvb_frontend.c |    9 +--
 drivers/mtd/chips/gen_probe.c             |    4 -
 include/linux/module.h                    |   13 ++--
 kernel/module.c                           |   87 ++++++++++++++++++++++--------
 5 files changed, 80 insertions(+), 38 deletions(-)