• Peter Zijlstra's avatar
    perf_counter: Fix swcounter context invariance · bcfc2602
    Peter Zijlstra authored
    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: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
    Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Cc: Paul Mackerras <paulus@samba.org>
    Cc: stephane eranian <eranian@googlemail.com>
    Cc: Corey J Ashford <cjashfor@us.ibm.com>
    LKML-Reference: <1250149915.10001.66.camel@twins>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    bcfc2602
perf_counter.c 110 KB