perf: Fix tear-down of inherited group events
authorPeter Zijlstra <[email protected]>
Tue, 15 Mar 2011 13:37:10 +0000 (14:37 +0100)
committerIngo Molnar <[email protected]>
Wed, 16 Mar 2011 13:04:14 +0000 (14:04 +0100)
commit38b435b16c36b0d863efcf3f07b34a6fac9873fd
tree017a36f9883767175f8018f43fac937a9fc22a24
parentee643c4179c3a18b018de3a4c07a7bb3a75c8e4e
perf: Fix tear-down of inherited group events

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 <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: <[email protected]> # .35+
LKML-Reference: <1300196470.2203.61.camel@twins>
Signed-off-by: Ingo Molnar <[email protected]>
kernel/perf_event.c