diff options
author | Peter Zijlstra <peterz@infradead.org> | 2014-05-05 05:49:16 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-05-07 07:44:18 -0400 |
commit | 63342411efd2d9350ad405205da036cd45ed1640 (patch) | |
tree | 61eabbb0fdd2a3a940f3d7aa7599d10124d3d915 /kernel/events | |
parent | 15a2d4de0eab533a76bee9e68d7e1063dd25401c (diff) |
perf: Validate locking assumption
Document and validate the locking assumption of event_sched_in().
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-sybq1publ9xt5no77cwvi0eo@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/events')
-rw-r--r-- | kernel/events/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 819ffc006d67..0de199729f04 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
@@ -1678,6 +1678,8 @@ event_sched_in(struct perf_event *event, | |||
1678 | u64 tstamp = perf_event_time(event); | 1678 | u64 tstamp = perf_event_time(event); |
1679 | int ret = 0; | 1679 | int ret = 0; |
1680 | 1680 | ||
1681 | lockdep_assert_held(&ctx->lock); | ||
1682 | |||
1681 | if (event->state <= PERF_EVENT_STATE_OFF) | 1683 | if (event->state <= PERF_EVENT_STATE_OFF) |
1682 | return 0; | 1684 | return 0; |
1683 | 1685 | ||