From: Kyle McMartin Date: Wed, 30 May 2007 06:43:16 +0000 (-0400) Subject: fix possible null ptr deref in kallsyms_lookup X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7a74fc4925067c2102175baef73f9b07ab519b71;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 Signed-off-by: Linus Torvalds --- diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index f1bda23140b2..fed54418626c 100644 --- a/kernel/kallsyms.c +++ b/kernel/kallsyms.c @@ -257,7 +257,8 @@ const char *kallsyms_lookup(unsigned long addr, 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; }