[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-8d53dd546f36073e0d29b0cfc24c665db301e3e7@git.kernel.org>
Date: Thu, 4 Mar 2010 16:33:07 GMT
From: "tip-bot for Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, paulmck@...ux.vnet.ibm.com,
hpa@...or.com, mingo@...hat.com, fweisbec@...il.com,
rostedt@...dmis.org, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:core/urgent] rcu, ftrace: Fix RCU lockdep splat in ftrace_perf_buf_prepare()
Commit-ID: 8d53dd546f36073e0d29b0cfc24c665db301e3e7
Gitweb: http://git.kernel.org/tip/8d53dd546f36073e0d29b0cfc24c665db301e3e7
Author: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
AuthorDate: Wed, 3 Mar 2010 17:50:18 -0800
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Thu, 4 Mar 2010 12:07:35 +0100
rcu, ftrace: Fix RCU lockdep splat in ftrace_perf_buf_prepare()
Change the pair of rcu_dereference() calls in
ftrace_perf_buf_prepare() to rcu_dereference_sched().
Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
Acked-by: Frederic Weisbecker <fweisbec@...il.com>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: laijs@...fujitsu.com
Cc: dipankar@...ibm.com
Cc: mathieu.desnoyers@...ymtl.ca
Cc: josh@...htriplett.org
Cc: dvhltc@...ibm.com
Cc: niv@...ibm.com
Cc: peterz@...radead.org
Cc: Valdis.Kletnieks@...edu
Cc: dhowells@...hat.com
Cc: Frederic Weisbecker <fweisbec@...il.com>
LKML-Reference: <1267667418-32233-3-git-send-email-paulmck@...ux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
include/trace/ftrace.h | 4 ++--
kernel/trace/trace_event_profile.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index 0804cd5..601ad77 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -699,9 +699,9 @@ __attribute__((section("_ftrace_events"))) event_##call = { \
* __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 end;
diff --git a/kernel/trace/trace_event_profile.c b/kernel/trace/trace_event_profile.c
index f0d6930..c1cc3ab 100644
--- a/kernel/trace/trace_event_profile.c
+++ b/kernel/trace/trace_event_profile.c
@@ -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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists