• Jamie Lokier's avatar
    [PATCH] CONFIG_PREEMPT fix of do_debug() · 28a59cb0
    Jamie Lokier authored
    If CONFIG_PREEMPT is enabled, and the kernel is preempted just before
    do_debug() has a chance to save the debug register values, DR6 could be
    read from the wrong CPU.
    
    It is exactly the same problem as reading %cr2 in the page fault
    handler.  Same fix: make the handler a interrupt gate, and enable
    interrupts only once safe.
    28a59cb0
traps.c 21.8 KB