perf_counter: Fix inheritance cleanup code
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 15 May 2009 18:45:59 +0000 (20:45 +0200)
committerIngo Molnar <mingo@elte.hu>
Sun, 17 May 2009 05:52:23 +0000 (07:52 +0200)
commit8bc2095951517e2c74b8aeeca4685ddd6b16ed4b
tree6342bfb21b642b22bd8f2d39f99faf4134de0cdb
parent0bbd0d4be8d5d3676c126e06e3c75c16def00441
perf_counter: Fix inheritance cleanup code

Clean up code that open-coded the list_{add,del}_counter() code in
__perf_counter_exit_task() which consequently diverged. This could
lead to software counter crashes.

Also, fold the ctx->nr_counter inc/dec into those functions and clean
up some of the related code.

[ Impact: fix potential sw counter crash, cleanup ]

Signed-off-by: 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>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_counter.c