Commit f2223216 authored by NeilBrown's avatar NeilBrown Committed by Greg Kroah-Hartman
Browse files

sunrpc: handle -ENOTCONN in xs_tcp_setup_socket()

[ Upstream commit 10f07402 ]

xs_tcp_finish_connecting() can return -ENOTCONN but the switch statement
in xs_tcp_setup_socket() treats that as an unhandled error.

If we treat it as a known error it would propagate back to
call_connect_status() which does handle that error code.  This appears
to be the intention of the commit (given below) which added -ENOTCONN as
a return status for xs_tcp_finish_connecting().

So add -ENOTCONN to the switch statement as an error to pass through to
the caller.

Link: https://bugzilla.suse.com/show_bug.cgi?id=1231050
Link: https://access.redhat.com/discussions/3434091


Fixes: 01d37c42 ("SUNRPC: xprt_connect() don't abort the task if the transport isn't bound")
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
Reviewed-by: default avatarBenjamin Coddington <bcodding@redhat.com>
Signed-off-by: default avatarAnna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a50863dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment