diff options
author | Kyle McMartin <kyle@parisc-linux.org> | 2007-05-30 02:43:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-30 13:51:38 -0400 |
commit | 7a74fc4925067c2102175baef73f9b07ab519b71 (patch) | |
tree | 652b0a4cd513ff7ce126e452b21ec7233f26bc4d /kernel | |
parent | b927b3e2c9bc39b7eeeaca91e4cd6c3ed59f165a (diff) |
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/kallsyms.c | 3 |
1 files changed, 2 insertions, 1 deletions
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, | |||
257 | pos = get_symbol_pos(addr, symbolsize, offset); | 257 | pos = get_symbol_pos(addr, symbolsize, offset); |
258 | /* Grab name */ | 258 | /* Grab name */ |
259 | kallsyms_expand_symbol(get_symbol_offset(pos), namebuf); | 259 | kallsyms_expand_symbol(get_symbol_offset(pos), namebuf); |
260 | *modname = NULL; | 260 | if (modname) |
261 | *modname = NULL; | ||
261 | return namebuf; | 262 | return namebuf; |
262 | } | 263 | } |
263 | 264 | ||