xprtrdma: Fix handling of connect errors
authorChuck Lever <chuck.lever@oracle.com>
Sat, 27 Jun 2020 16:35:20 +0000 (12:35 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jul 2020 07:34:09 +0000 (09:34 +0200)
commita6793b643d90f7c04ac7c8b07cf0a28b44198969
tree4d266aec880dfe6c4e49f0322ce079b08182915d
parentb158bdd71ef550981bdac7a9bf63cd4f163f3bb8
xprtrdma: Fix handling of connect errors

[ Upstream commit af667527b0e34912d2cb3586d585f66db4e4f486 ]

Ensure that the connect worker is awoken if an attempt to establish
a connection is unsuccessful. Otherwise the worker waits forever
and the transport workload hangs.

Connect errors should not attempt to destroy the ep, since the
connect worker continues to use it after the handler runs, so these
errors are now handled independently of DISCONNECTED events.

Reported-by: Dan Aloni <dan@kernelim.com>
Fixes: e28ce90083f0 ("xprtrdma: kmalloc rpcrdma_ep separate from rpcrdma_xprt")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sunrpc/xprtrdma/verbs.c