]> git.karo-electronics.de Git - linux-beck.git/commit
tracing/filters: add filter_mutex to protect filter predicates
authorTom Zanussi <tzanussi@gmail.com>
Fri, 17 Apr 2009 05:27:08 +0000 (00:27 -0500)
committerIngo Molnar <mingo@elte.hu>
Fri, 17 Apr 2009 16:28:27 +0000 (18:28 +0200)
commitac1adc55fc71c7515caa2eb0e63e49b3d1c6a47c
tree7a97cf9512572c53d0802725f8e0ad6a2d4b2204
parent46de405f25f1d9fa73b657ffbb752aa0cc87a91d
tracing/filters: add filter_mutex to protect filter predicates

This patch adds a filter_mutex to prevent the filter predicates from
being accessed concurrently by various external functions.

It's based on a previous patch by Li Zefan:
        "[PATCH 7/7] tracing/filters: make filter preds RCU safe"

v2 changes:

- fixed wrong value returned in a add_subsystem_pred() failure case
  noticed by Li Zefan.

[ Impact: fix trace filter corruption/crashes on parallel access ]

Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Reviewed-by: Li Zefan <lizf@cn.fujitsu.com>
Tested-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: paulmck@linux.vnet.ibm.com
LKML-Reference: <1239946028.6639.13.camel@tropicana>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/trace/trace.h
kernel/trace/trace_events.c
kernel/trace/trace_events_filter.c