perf: Fix inherit vs. context rotation bug
authorThomas Gleixner <tglx@linutronix.de>
Wed, 24 Nov 2010 09:05:55 +0000 (10:05 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 26 Nov 2010 14:00:56 +0000 (15:00 +0100)
commitdddd3379a619a4cb8247bfd3c94ca9ae3797aa2e
tree9b090784b46956d236b51c4addfcd97f575f205e
parent02a9d03772aa1ff33a26180a2da0bfb191240eda
perf: Fix inherit vs. context rotation bug

It was found that sometimes children of tasks with inherited events had
one extra event. Eventually it turned out to be due to the list rotation
no being exclusive with the list iteration in the inheritance code.

Cure this by temporarily disabling the rotation while we inherit the events.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/perf_event.h
kernel/perf_event.c