perf_counter: fix threaded task exit
authorIngo Molnar <mingo@elte.hu>
Sun, 17 May 2009 09:24:08 +0000 (11:24 +0200)
committerIngo Molnar <mingo@elte.hu>
Sun, 17 May 2009 09:26:57 +0000 (11:26 +0200)
commit0203026b58b4299ba7281c0b4b417207c1f05d0e
tree02c9f3486544b0f7db1922f05cf12e6480eaf95f
parent856d56b9e5de650a64a6c41c17aaed702b55d578
perf_counter: fix threaded task exit

Flushing counters in __exit_signal() with irqs disabled is not
a good idea as perf_counter_exit_task() acquires mutexes. So
flush it before acquiring the tasklist lock.

(Note, we still need a fix for when the PID has been unhashed.)

[ Impact: fix crash with inherited counters ]

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/exit.c