From 92dfc9dc7ba63134f721b6e745dbdcfc13ea341b Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 8 Feb 2008 04:18:43 -0800 Subject: fix "modules: make module_address_lookup() safe" Get the constness right, avoid nasty cast. Cc: Ingo Molnar Cc: Kyle McMartin Cc: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- kernel/module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kernel/module.c') diff --git a/kernel/module.c b/kernel/module.c index 676c023c831..4202da97a1d 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) -- cgit v1.2.3