perf: Robustify event->owner usage and SMP ordering
authorPeter Zijlstra <[email protected]>
Tue, 26 Jan 2016 11:30:14 +0000 (12:30 +0100)
committerIngo Molnar <[email protected]>
Fri, 29 Jan 2016 07:35:31 +0000 (08:35 +0100)
commitf47c02c0c8403963fbb8c3484e285727305d0f73
tree3672f498ef05670f261a8bfbfd66925eca852879
parent6e801e016917989ab8a7ddfc4229a15a5621622a
perf: Robustify event->owner usage and SMP ordering

Use smp_store_release() to clear event->owner and
lockless_dereference() to observe it. Further use READ_ONCE() for all
lockless reads.

This changes perf_remove_from_owner() to leave event->owner cleared.

Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Vince Weaver <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
kernel/events/core.c