]> git.baikalelectronics.ru Git - kernel.git/commit
tracing/kprobes: Fix field creation's bad error handling
authorFrederic Weisbecker <fweisbec@gmail.com>
Tue, 8 Dec 2009 09:00:04 +0000 (10:00 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 9 Dec 2009 09:32:21 +0000 (10:32 +0100)
commit83d57c8f45981ada3c3aa700e3348e00079e373b
treeba66dda1220c6f3f9208b56cb50f716bbf08fa13
parent617869699298e346cf231a068816737cc3b257ac
tracing/kprobes: Fix field creation's bad error handling

When we define the common event fields in kprobe, we invert the error
handling and return immediately in case of success. Then we omit
to define specific kprobes fields (ip and nargs), and specific
kretprobes fields (func, ret_ip, nargs). And we only define them
when we fail to create common fields.

The most visible consequence is that we can't create filter for
k(ret)probes specific fields.

This patch re-invert the success/error handling to fix it.

Reported-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Li Zefan <lizf@cn.fujitsu.com>
LKML-Reference: <1260263815-5167-1-git-send-regression-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace_kprobe.c