Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63342411 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

perf: Validate locking assumption



Document and validate the locking assumption of event_sched_in().

Signed-off-by: default avatarPeter 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: default avatarIngo Molnar <mingo@kernel.org>
parent 15a2d4de
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;