]> git.baikalelectronics.ru Git - kernel.git/commit
perf: Fix event->ctx locking
authorPeter Zijlstra <peterz@infradead.org>
Fri, 23 Jan 2015 11:24:14 +0000 (12:24 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 4 Feb 2015 07:07:10 +0000 (08:07 +0100)
commit6e54b35d818473e76403a2770ce51009ec5a7735
treedd488b9bda2685c213a09d3feeb9e4f8a6d9dcaa
parent1b4f40e460563c1804ab85de18ab37b2b9b71c69
perf: Fix event->ctx locking

There have been a few reported issues wrt. the lack of locking around
changing event->ctx. This patch tries to address those.

It avoids the whole rwsem thing; and while it appears to work, please
give it some thought in review.

What I did fail at is sensible runtime checks on the use of
event->ctx, the RCU use makes it very hard.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/20150123125834.209535886@infradead.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c