• Peter Zijlstra's avatar
    perf: Fix crash in swevents · c6df8d5a
    Peter Zijlstra authored
    Frederic reported that because swevents handling doesn't disable IRQs
    anymore, we can get a recursion of perf_adjust_period(), once from
    overflow handling and once from the tick.
    
    If both call ->disable, we get a double hlist_del_rcu() and trigger
    a LIST_POISON2 dereference.
    
    Since we don't actually need to stop/start a swevent to re-programm
    the hardware (lack of hardware to program), simply nop out these
    callbacks for the swevent pmu.
    Reported-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
    LKML-Reference: <1275557609.27810.35218.camel@twins>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    c6df8d5a
perf_event.c 133 KB