• Neil Brown's avatar
    SUNRPC: never enqueue a ->rq_cong request on ->sending · 31469735
    Neil Brown authored
    commit 29807318 upstream.
    
    If the sending queue has a task without ->rq_cong set at the front,
    and then a number of tasks with ->rq_cong set such that they use
    the entire congestion window, then the queue deadlocks.  The first
    entry cannot be processed until later entries complete.
    
    This scenario has been seen with a client using UDP to access a server,
    and the network connection breaking for a period of time - it doesn't
    recover.
    
    It never really makes sense for an ->rq_cong request to be on the ->sending
    queue, but it can happen when a request is being retried, and finds
    the transport if locked (XPRT_LOCKED).  In this case we simple call
    __xprt_put_cong() and the deadlock goes away.
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
    Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
    31469735
xprt.c 34.5 KB