perf_counter: Robustify counter-free logic
authorIngo Molnar <mingo@elte.hu>
Sun, 17 May 2009 09:08:41 +0000 (11:08 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 29 May 2009 12:28:37 +0000 (14:28 +0200)
commit012b84dae17126d8b5d159173091eb3db5a2bc43
tree0b5f85b66084c3186a8e4c56d9ed074d3b2593ee
parent3f4dee227348daac32f36daad9a91059efd0723e
perf_counter: Robustify counter-free logic

This fixes a nasty crash and highlights a bug that we were
freeing failed-fork() counters incorrectly.

(the fix for that will come separately)

[ Impact: fix crashes/lockups with inherited counters ]

Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: John Kacur <jkacur@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_counter.c