tracepoints: Prevent null probe from being added
authorSahara <keun-o.park@windriver.com>
Mon, 15 Apr 2013 02:13:15 +0000 (11:13 +0900)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 19 Apr 2013 23:59:49 +0000 (19:59 -0400)
commit4c69e6ea415a35eb7f0fc8ee9390c8f7436492a2
tree586b87d0779390d498ce45df375b97decacfb059
parentd2802d0739dcc61af5e5ea00773ce7ddead4e9c2
tracepoints: Prevent null probe from being added

Somehow tracepoint_entry_add_probe() function allows a null probe function.
And, this may lead to unexpected results since the number of probe
functions in an entry can be counted by checking whether a probe is null
or not in the for-loop.
This patch prevents a null probe from being added.
In tracepoint_entry_remove_probe() function, checking probe parameter
within the for-loop is moved out for code efficiency, leaving the null probe
feature which removes all probe functions in the entry.

Link: http://lkml.kernel.org/r/1365991995-19445-1-git-send-email-kpark3469@gmail.com
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Sahara <keun-o.park@windriver.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/tracepoint.c