• Chuck Lever's avatar
    xprtrdma: Do not refresh Receive Queue while it is draining · 15788d1d
    Chuck Lever authored
    Currently the Receive completion handler refreshes the Receive Queue
    whenever a successful Receive completion occurs.
    
    On disconnect, xprtrdma drains the Receive Queue. The first few
    Receive completions after a disconnect are typically successful,
    until the first flushed Receive.
    
    This means the Receive completion handler continues to post more
    Receive WRs after the drain sentinel has been posted. The late-
    posted Receives flush after the drain sentinel has completed,
    leading to a crash later in rpcrdma_xprt_disconnect().
    
    To prevent this crash, xprtrdma has to ensure that the Receive
    handler stops posting Receives before ib_drain_rq() posts its
    drain sentinel.
    Suggested-by: default avatarTom Talpey <tom@talpey.com>
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
    15788d1d
verbs.c 37.1 KB