]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf: Fix tear-down of inherited group events
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Tue, 15 Mar 2011 13:37:10 +0000 (14:37 +0100)
committerAK <andi@firstfloor.org>
Thu, 31 Mar 2011 18:58:53 +0000 (11:58 -0700)
commit552dca81137cfd49b2b4eebffc6a3621da31e83f
tree863716732b78b30508b87984750330d668937118
parent94f8413636c7c43eeebee440510adc4faa19a398
perf: Fix tear-down of inherited group events

[ upstream commit 38b435b16c36b0d863efcf3f07b34a6fac9873fd ]

When destroying inherited events, we need to destroy groups too,
otherwise the event iteration in perf_event_exit_task_context() will
miss group siblings and we leak events with all the consequences.

Reported-and-tested-by: Vince Weaver <vweaver1@eecs.utk.edu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: <stable@kernel.org> # .35+
LKML-Reference: <1300196470.2203.61.camel@twins>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_event.c