fix possible null ptr deref in kallsyms_lookup ugh, this function gets called by our unwinder. recursive backtrace for the win... bisection to find this one was "fun." Signed-off-by: Kyle McMartin <kyle@parisc-linux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index f1bda23..fed5441 100644 --- a/kernel/kallsyms.c +++ b/kernel/kallsyms.c
@@ -257,7 +257,8 @@ pos = get_symbol_pos(addr, symbolsize, offset); /* Grab name */ kallsyms_expand_symbol(get_symbol_offset(pos), namebuf); - *modname = NULL; + if (modname) + *modname = NULL; return namebuf; }