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)
commitb2a5cd6938879b5bcfef0a73c28fea84c49519c2
treee2039a9f7a4766dbea703c6ed32db881863efc1d
parent1913130553aa231644eb4e955b1a2c533fe33d17
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