[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-sybq1publ9xt5no77cwvi0eo@git.kernel.org>
Date: Thu, 8 May 2014 03:45:09 -0700
From: tip-bot for Peter Zijlstra <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, eranian@...gle.com, paulus@...ba.org,
hpa@...or.com, mingo@...nel.org, torvalds@...ux-foundation.org,
peterz@...radead.org, acme@...nel.org, vincent.weaver@...ne.edu,
tglx@...utronix.de
Subject: [tip:perf/core] perf: Validate locking assumption
Commit-ID: 63342411efd2d9350ad405205da036cd45ed1640
Gitweb: http://git.kernel.org/tip/63342411efd2d9350ad405205da036cd45ed1640
Author: Peter Zijlstra <peterz@...radead.org>
AuthorDate: Mon, 5 May 2014 11:49:16 +0200
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 7 May 2014 13:44:18 +0200
perf: Validate locking assumption
Document and validate the locking assumption of event_sched_in().
Signed-off-by: Peter Zijlstra <peterz@...radead.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Vince Weaver <vincent.weaver@...ne.edu>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/n/tip-sybq1publ9xt5no77cwvi0eo@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/events/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 819ffc0..0de1997 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -1678,6 +1678,8 @@ event_sched_in(struct perf_event *event,
u64 tstamp = perf_event_time(event);
int ret = 0;
+ lockdep_assert_held(&ctx->lock);
+
if (event->state <= PERF_EVENT_STATE_OFF)
return 0;
--
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