Skip to content
Snippets Groups Projects
  • Avi Kivity's avatar
    84046f23
    sched: fix preempt_enable() when interrupts are disabled · 84046f23
    Avi Kivity authored
    If interrupts are disabled, we must not call schedule() even if
    the preemption counter says we need to, as the context is not preemption
    safe.
    
    This manifested itself in a wake() within a timer causing a schedule(),
    which re-enabled interrupts, which caused further manipulation of the timer
    list to occur concurrently with the next interrupt, resulting in corruption.
    
    Fixes timer stress test failure.
    84046f23
    History
    sched: fix preempt_enable() when interrupts are disabled
    Avi Kivity authored
    If interrupts are disabled, we must not call schedule() even if
    the preemption counter says we need to, as the context is not preemption
    safe.
    
    This manifested itself in a wake() within a timer causing a schedule(),
    which re-enabled interrupts, which caused further manipulation of the timer
    list to occur concurrently with the next interrupt, resulting in corruption.
    
    Fixes timer stress test failure.