From: Peter Zijlstra Date: Thu, 13 Aug 2009 07:51:55 +0000 (+0200) Subject: perf_counter: Fix swcounter context invariance X-Git-Tag: v2.6.31-rc6~2^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcfc2602e8541ac13b1def38e2591dca072cff7a;p=pandora-kernel.git perf_counter: Fix swcounter context invariance perf_swcounter_is_counting() uses a lock, which means we cannot use swcounters from NMI or when holding that particular lock, this is unintended. The below removes the lock, this opens up race window, but not worse than the swcounters already experience due to RCU traversal of the context in perf_swcounter_ctx_event(). This also fixes the hard lockups while opening a lockdep tracepoint counter. Signed-off-by: Peter Zijlstra Acked-by: Frederic Weisbecker Cc: Paul Mackerras Cc: stephane eranian Cc: Corey J Ashford LKML-Reference: <1250149915.10001.66.camel@twins> Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed