• Frederic Weisbecker's avatar
    tracing/branch-tracer: fix a trace recursion on branch tracer · 072b40a1
    Frederic Weisbecker authored
    Impact: fix crash when enabling the branch-tracer
    
    When the branch tracer inserts an event through
    probe_likely_condition(), it calls local_irq_save() and then results
    in a trace recursion.
    
    local_irq_save() -> trace_hardirqs_off() -> trace_hardirqs_off_caller()
    	-> unlikely()
    
    The trace_branch.c file is protected by DISABLE_BRANCH_PROFILING but
    that doesn't prevent from external call to functions that use
    unlikely().
    
    My box crashed each time I tried to set this tracer (sudden and hard
    reboot).
    Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    072b40a1
trace_branch.c 6.77 KB