Skip to content
Snippets Groups Projects
Commit 7a74fc49 authored by Kyle McMartin's avatar Kyle McMartin Committed by Linus Torvalds
Browse files

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: default avatarKyle McMartin <kyle@parisc-linux.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b927b3e2
No related branches found
No related tags found
No related merge requests found
...@@ -257,7 +257,8 @@ const char *kallsyms_lookup(unsigned long addr, ...@@ -257,7 +257,8 @@ const char *kallsyms_lookup(unsigned long addr,
pos = get_symbol_pos(addr, symbolsize, offset); pos = get_symbol_pos(addr, symbolsize, offset);
/* Grab name */ /* Grab name */
kallsyms_expand_symbol(get_symbol_offset(pos), namebuf); kallsyms_expand_symbol(get_symbol_offset(pos), namebuf);
*modname = NULL; if (modname)
*modname = NULL;
return namebuf; return namebuf;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment