aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/trace.h
diff options
context:
space:
mode:
authorTom Zanussi <tzanussi@gmail.com>2009-04-17 01:27:08 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-17 12:28:27 -0400
commitac1adc55fc71c7515caa2eb0e63e49b3d1c6a47c (patch)
tree7a97cf9512572c53d0802725f8e0ad6a2d4b2204 /kernel/trace/trace.h
parent46de405f25f1d9fa73b657ffbb752aa0cc87a91d (diff)
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>
Diffstat (limited to 'kernel/trace/trace.h')
-rw-r--r--kernel/trace/trace.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 8817c18ef97a..247948e81b08 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -757,13 +757,15 @@ struct filter_pred {
757}; 757};
758 758
759extern void filter_free_pred(struct filter_pred *pred); 759extern void filter_free_pred(struct filter_pred *pred);
760extern void filter_print_preds(struct filter_pred **preds, int n_preds, 760extern void filter_print_preds(struct ftrace_event_call *call,
761 struct trace_seq *s); 761 struct trace_seq *s);
762extern int filter_parse(char **pbuf, struct filter_pred *pred); 762extern int filter_parse(char **pbuf, struct filter_pred *pred);
763extern int filter_add_pred(struct ftrace_event_call *call, 763extern int filter_add_pred(struct ftrace_event_call *call,
764 struct filter_pred *pred); 764 struct filter_pred *pred);
765extern void filter_disable_preds(struct ftrace_event_call *call); 765extern void filter_disable_preds(struct ftrace_event_call *call);
766extern void filter_free_subsystem_preds(struct event_subsystem *system); 766extern void filter_free_subsystem_preds(struct event_subsystem *system);
767extern void filter_print_subsystem_preds(struct event_subsystem *system,
768 struct trace_seq *s);
767extern int filter_add_subsystem_pred(struct event_subsystem *system, 769extern int filter_add_subsystem_pred(struct event_subsystem *system,
768 struct filter_pred *pred); 770 struct filter_pred *pred);
769 771