• Chuck Lever's avatar
    xprtrdma: Fix trace point use-after-free race · bdb2ce82
    Chuck Lever authored
    It's not safe to use resources pointed to by the @send_wr of
    ib_post_send() _after_ that function returns. Those resources are
    typically freed by the Send completion handler, which can run before
    ib_post_send() returns.
    
    Thus the trace points currently around ib_post_send() in the
    client's RPC/RDMA transport are a hazard, even when they are
    disabled. Rearrange them so that they touch the Work Request only
    _before_ ib_post_send() is invoked.
    
    Fixes: ab03eff5 ("xprtrdma: Add trace points in RPC Call transmit paths")
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    bdb2ce82
rpcrdma.h 38.7 KB