summaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-11-24 10:05:55 +0100
committerIngo Molnar <mingo@elte.hu>2010-11-26 15:00:56 +0100
commitdddd3379a619a4cb8247bfd3c94ca9ae3797aa2e (patch)
tree9b090784b46956d236b51c4addfcd97f575f205e /include/linux/perf_event.h
parent02a9d03772aa1ff33a26180a2da0bfb191240eda (diff)
downloadlinux-dddd3379a619a4cb8247bfd3c94ca9ae3797aa2e.tar.gz
linux-dddd3379a619a4cb8247bfd3c94ca9ae3797aa2e.tar.bz2
linux-dddd3379a619a4cb8247bfd3c94ca9ae3797aa2e.zip
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>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r--include/linux/perf_event.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 40150f345982..142e3d6042c7 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -850,6 +850,7 @@ struct perf_event_context {
int nr_active;
int is_active;
int nr_stat;
+ int rotate_disable;
atomic_t refcount;
struct task_struct *task;