• Chuck Lever's avatar
    xprtrdma: Address coverity complaint about wait_for_completion() · 109b88ab
    Chuck Lever authored
    > ** CID 114101:  Error handling issues  (CHECKED_RETURN)
    > /net/sunrpc/xprtrdma/verbs.c: 355 in rpcrdma_create_id()
    
    Commit 5675add3 ("RPC/RDMA: harden connection logic against
    missing/late rdma_cm upcalls.") replaced wait_for_completion() calls
    with these two call sites.
    
    The original wait_for_completion() calls were added in the initial
    commit of verbs.c, which was commit c56c65fb ("RPCRDMA: rpc rdma
    verbs interface implementation"), but these returned void.
    
    rpcrdma_create_id() is called by the RDMA connect worker, which
    probably won't ever be interrupted. It is also called by
    rpcrdma_ia_open which is in the synchronous mount path, and ^C is
    possible there.
    
    Add a bit of logic at those two call sites to return if the waits
    return ERESTARTSYS.
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
    109b88ab
verbs.c 34.9 KB