diff options
author | Oleg Nesterov <[email protected]> | 2011-01-19 19:22:28 +0100 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2011-01-19 20:04:28 +0100 |
commit | 8550d7cb6ed6c89add49c3b6ad4c753ab8a3d7f9 (patch) | |
tree | 9942aa32e7706bbb9bf52b9aecd542008f50d5aa /net/unix/sysctl_net_unix.c | |
parent | dbe08d82ce3967ccdf459f7951d02589cf967300 (diff) |
perf: Fix perf_event_init_task()/perf_event_free_task() interaction
perf_event_init_task() should clear child->perf_event_ctxp[]
before anything else. Otherwise, if
perf_event_init_context(perf_hw_context) fails,
perf_event_free_task() can free perf_event_ctxp[perf_sw_context]
copied from parent->perf_event_ctxp[] by dup_task_struct().
Also move the initialization of perf_event_mutex and
perf_event_list from perf_event_init_context() to
perf_event_init_context().
Signed-off-by: Oleg Nesterov <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Prasad <[email protected]>
Cc: Roland McGrath <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions