summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2008-02-08 04:18:43 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 09:22:24 -0800
commit92dfc9dc7ba63134f721b6e745dbdcfc13ea341b (patch)
treeaa959d2d5ba1819651888601e4d917b01ddcc88c /kernel
parent6d7623943c905efae327933bc5ee0b2f78e15f56 (diff)
downloadop-kernel-dev-92dfc9dc7ba63134f721b6e745dbdcfc13ea341b.zip
op-kernel-dev-92dfc9dc7ba63134f721b6e745dbdcfc13ea341b.tar.gz
fix "modules: make module_address_lookup() safe"
Get the constness right, avoid nasty cast. Cc: Ingo Molnar <mingo@elte.hu> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 676c023c..4202da9 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2253,7 +2253,7 @@ static const char *get_ksymbol(struct module *mod,
/* For kallsyms to ask for address resolution. NULL means not found. Careful
* not to lock to avoid deadlock on oopses, simply disable preemption. */
-char *module_address_lookup(unsigned long addr,
+const char *module_address_lookup(unsigned long addr,
unsigned long *size,
unsigned long *offset,
char **modname,
@@ -2278,7 +2278,7 @@ char *module_address_lookup(unsigned long addr,
ret = namebuf;
}
preempt_enable();
- return (char *)ret;
+ return ret;
}
int lookup_module_symbol_name(unsigned long addr, char *symname)
OpenPOWER on IntegriCloud