Skip to content
Snippets Groups Projects
  • Chuck Lever's avatar
    35d8b10a
    xprtrdma: Fix cwnd update ordering · 35d8b10a
    Chuck Lever authored
    
    After a reconnect, the reply handler is opening the cwnd (and thus
    enabling more RPC Calls to be sent) /before/ rpcrdma_post_recvs()
    can post enough Receive WRs to receive their replies. This causes an
    RNR and the new connection is lost immediately.
    
    The race is most clearly exposed when KASAN and disconnect injection
    are enabled. This slows down rpcrdma_rep_create() enough to allow
    the send side to post a bunch of RPC Calls before the Receive
    completion handler can invoke ib_post_recv().
    
    Fixes: 2ae50ad6 ("xprtrdma: Close window between waking RPC senders and posting Receives")
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
    35d8b10a
    History
    xprtrdma: Fix cwnd update ordering
    Chuck Lever authored
    
    After a reconnect, the reply handler is opening the cwnd (and thus
    enabling more RPC Calls to be sent) /before/ rpcrdma_post_recvs()
    can post enough Receive WRs to receive their replies. This causes an
    RNR and the new connection is lost immediately.
    
    The race is most clearly exposed when KASAN and disconnect injection
    are enabled. This slows down rpcrdma_rep_create() enough to allow
    the send side to post a bunch of RPC Calls before the Receive
    completion handler can invoke ib_post_recv().
    
    Fixes: 2ae50ad6 ("xprtrdma: Close window between waking RPC senders and posting Receives")
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>