• Andrew Morton's avatar
    [PATCH] timer re-addition lockup fix · bb8c9453
    Andrew Morton authored
    This is a forward-port of Andrea's fix in 2.4.
    
    If a timer handler re-adds a timer to go off right now, __run_timers() will
    never terminate.  (I wrote a test.  It happens.)
    
    Fix that up by teaching internal_add_timer() to detect when it is being
    called from within the context of __run_timers() and to park newly-added
    timers onto a temp list instead.  These timers are then added for real by
    __run_timers(), after it has finished processing all pending timers.
    bb8c9453
timer.c 31.6 KB