diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-08-26 17:38:30 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-08-26 20:33:03 -0400 |
commit | 24851d2447830e6cba4c4b641cb73e713f312373 (patch) | |
tree | b0aa315fc67b3aedab3bd84ef99ea3d933fd365c /include/linux/kprobes.h | |
parent | 30a7e073b590ebd1829a906164b0a637e77cc967 (diff) |
tracing/kprobes: Dump the culprit kprobe in case of kprobe recursion
Kprobes can enter into a probing recursion, ie: a kprobe that does an
endless loop because one of its core mechanism function used during
probing is also probed itself.
This patch helps pinpointing the kprobe that raised such recursion
by dumping it and raising a BUG instead of a warning (we also disarm
the kprobe to try avoiding recursion in BUG itself). Having a BUG
instead of a warning stops the stacktrace in the right place and
doesn't pollute the logs with hundreds of traces that eventually end
up in a stack overflow.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Diffstat (limited to 'include/linux/kprobes.h')
-rw-r--r-- | include/linux/kprobes.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index bcd9c07848be..87eb79c9dd60 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -296,6 +296,8 @@ void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head); | |||
296 | int disable_kprobe(struct kprobe *kp); | 296 | int disable_kprobe(struct kprobe *kp); |
297 | int enable_kprobe(struct kprobe *kp); | 297 | int enable_kprobe(struct kprobe *kp); |
298 | 298 | ||
299 | void dump_kprobe(struct kprobe *kp); | ||
300 | |||
299 | #else /* !CONFIG_KPROBES: */ | 301 | #else /* !CONFIG_KPROBES: */ |
300 | 302 | ||
301 | static inline int kprobes_built_in(void) | 303 | static inline int kprobes_built_in(void) |