From 7a74fc4925067c2102175baef73f9b07ab519b71 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Wed, 30 May 2007 02:43:16 -0400 Subject: [PATCH] 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 --- kernel/kallsyms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c index f1bda23140..fed5441862 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; } -- 2.39.5