perf: Fix group moving
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 15 Oct 2010 09:40:29 +0000 (11:40 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 18 Oct 2010 17:58:51 +0000 (19:58 +0200)
commit74c3337c2fc6389d3a57a622a936036b6db6b2e8
treed87232b7cc19eef0f1fe0a0bb167868513819b31
parente360adbe29241a0194e10e20595360dd7b98a2b3
perf: Fix group moving

Matt found we trigger the WARN_ON_ONCE() in perf_group_attach() when we take
the move_group path in perf_event_open().

Since we cannot de-construct the group (we rely on it to move the events), we
have to simply ignore the double attach. The group state is context invariant
and doesn't need changing.

Reported-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1287135757.29097.1368.camel@twins>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_event.c