rcu, ftrace: Fix RCU lockdep splat in ftrace_perf_buf_prepare()
[linux-2.6.git] / kernel / trace / trace_event_profile.c
index f0d6930..c1cc3ab 100644 (file)
@@ -138,9 +138,9 @@ __kprobes void *ftrace_perf_buf_prepare(int size, unsigned short type,
        cpu = smp_processor_id();
 
        if (in_nmi())
-               trace_buf = rcu_dereference(perf_trace_buf_nmi);
+               trace_buf = rcu_dereference_sched(perf_trace_buf_nmi);
        else
-               trace_buf = rcu_dereference(perf_trace_buf);
+               trace_buf = rcu_dereference_sched(perf_trace_buf);
 
        if (!trace_buf)
                goto err;