]> git.baikalelectronics.ru Git - kernel.git/commit
xprtrdma: Address coverity complaint about wait_for_completion()
authorChuck Lever <chuck.lever@oracle.com>
Tue, 29 Nov 2016 15:52:40 +0000 (10:52 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 29 Nov 2016 21:45:44 +0000 (16:45 -0500)
commit31ce4804d2d8e19fc0d2f0be65a32fe4019b7635
tree8beefc083678dbf7e7b9b74af402181c0fe06a44
parent06676dcf38bbecc67f88b8dc32d3c0b2668a1118
xprtrdma: Address coverity complaint about wait_for_completion()

> ** CID 114101:  Error handling issues  (CHECKED_RETURN)
> /net/sunrpc/xprtrdma/verbs.c: 355 in rpcrdma_create_id()

Commit 3a5eab4e13fc ("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 f5af629041f3 ("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: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/verbs.c