]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit06399d69b5a7680d4155be116db5d50937e3d3c9
tree586b87d0779390d498ce45df375b97decacfb059
parent8936c0325453360ccf9e1ecabfdb36bb06361a0f
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