mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
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>
This commit is contained in:
parent
6d7623943c
commit
92dfc9dc7b
2 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue