aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2011-08-22 09:41:46 -0400
committerSteven Rostedt <rostedt@goodmis.org>2011-08-30 12:27:07 -0400
commit86b6ef21b80ac6565d172cdab4384404de007eea (patch)
tree5156d0d78b4cb0fbbd58ce2281c19f9bba6864f6 /kernel/trace
parent1d0e78e380cd2802aa603a50e08220dfc681141c (diff)
tracing: Add preempt disable for filter self test
The self testing for event filters does not really need preemption disabled as there are no races at the time of testing, but the functions it calls uses rcu_dereference_sched() which will complain if preemption is not disabled. Cc: Jiri Olsa <jolsa@redhat.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_events_filter.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 6a642e278241..816d3d074979 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -2101,6 +2101,11 @@ static __init int ftrace_test_event_filter(void)
2101 break; 2101 break;
2102 } 2102 }
2103 2103
2104 /*
2105 * The preemption disabling is not really needed for self
2106 * tests, but the rcu dereference will complain without it.
2107 */
2108 preempt_disable();
2104 if (*d->not_visited) 2109 if (*d->not_visited)
2105 walk_pred_tree(filter->preds, filter->root, 2110 walk_pred_tree(filter->preds, filter->root,
2106 test_walk_pred_cb, 2111 test_walk_pred_cb,
@@ -2108,6 +2113,7 @@ static __init int ftrace_test_event_filter(void)
2108 2113
2109 test_pred_visited = 0; 2114 test_pred_visited = 0;
2110 err = filter_match_preds(filter, &d->rec); 2115 err = filter_match_preds(filter, &d->rec);
2116 preempt_enable();
2111 2117
2112 __free_filter(filter); 2118 __free_filter(filter);
2113 2119