perf_events: Fix races and clean up perf_event and perf_mmap_data interaction

commit ac9721f3f5 upstream.

In order to move toward separate buffer objects, rework the whole
perf_mmap_data construct to be a more self-sufficient entity, one
with its own lifetime rules.

This greatly sanitizes the whole output redirection code, which
was riddled with bugs and races.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Peter Zijlstra 2010-05-27 12:54:41 +02:00 • committed by Greg Kroah-Hartman
commit 5842e8e202
2 changed files with 129 additions and 93 deletions