]> err.no Git - linux-2.6/blobdiff - kernel/module.c
fix "modules: make module_address_lookup() safe"
[linux-2.6] / kernel / module.c
index 676c023c831b6befb26bff0633418ba7b431d2e5..4202da97a1da8c289479880155807d4c1aa5766e 100644 (file)
@@ -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)