• Steven Rostedt's avatar
    x86: Reset the debug_stack update counter · d961b4e3
    Steven Rostedt authored
    commit c0525a69 upstream.
    
    When an NMI goes off and it sees that it preempted the debug stack,
    to keep the debug stack safe, it changes the IDT to point to one that
    does not modify the stack on breakpoint (to allow breakpoints in NMIs).
    
    But the variable that gets set to know to undo it on exit never gets
    cleared on exit. Thus every NMI will reset it on exit the first time
    it is done even if it does not need to be reset.
    
    [ Added H. Peter Anvin's suggestion to use this_cpu_read/write ]
    Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    d961b4e3
nmi.c 14 KB