• Martin Blix Grydeland's avatar
    Close race condition on HTTP1 session step counter · 713be801
    Martin Blix Grydeland authored
    When going on a waitinglist, the HTTP1 step counter was set to
    S_STP_H1BUSY to allow conditions to be checked on return specific to
    having been on a waitinglist. Though the step counter was set after
    entering the waitinglist, and if the session was rescheduled
    immediately on another thread a race opened which would mess up the
    state handling.
    
    Fix this by elliminating the S_STP_H1BUSY step, and having condition
    checks on req->hash_objhead in the S_STP_H1PROC state to handle the
    waitinglist return specific checks.
    
    The panic output has been changed to include the req->hash_objhead
    pointer if set. This exposes the waitinglist condition in the panic
    output which would otherwise be hidden by the removal of the
    S_STP_H1BUSY step.
    
    Fixes: #2117
    713be801
cache_panic.c 15.4 KB