]> git.baikalelectronics.ru Git - kernel.git/commit
kprobes: fix a null pointer bug in register_kretprobe()
authorMasami Hiramatsu <mhiramat@redhat.com>
Tue, 4 Mar 2008 22:29:44 +0000 (14:29 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 5 Mar 2008 00:35:19 +0000 (16:35 -0800)
commit9117aba83e593cb98b8057f5c310b0ff2572a2bb
treee2039a9f7a4766dbea703c6ed32db881863efc1d
parentc0625e3bd597e8cb33b5522ac3d22c93a012f69a
kprobes: fix a null pointer bug in register_kretprobe()

Fix a bug in regiseter_kretprobe() which does not check rp->kp.symbol_name ==
NULL before calling kprobe_lookup_name.

For maintainability, this introduces kprobe_addr helper function which
resolves addr field.  It is used by register_kprobe and register_kretprobe.

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Jim Keniston <jkenisto@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/kprobes.c