summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2024-10-09 16:28:06 +1100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-11-14 13:15:10 +0100
commitf22232160ee843b6074c51ef6b4693c6197b9eb2 (patch)
tree9da56b5dfe67da1ac9c501f71dad8cb04e11fa48 /net
parenta50863dd1f92d43c975ab2ecc3476617fe98a66e (diff)
downloadlinux-f22232160ee843b6074c51ef6b4693c6197b9eb2.tar.gz
linux-f22232160ee843b6074c51ef6b4693c6197b9eb2.tar.bz2
linux-f22232160ee843b6074c51ef6b4693c6197b9eb2.zip
sunrpc: handle -ENOTCONN in xs_tcp_setup_socket()
[ Upstream commit 10f0740234f0b157b41bdc7e9c3555a9b86c1599 ] 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: 01d37c428ae0 ("SUNRPC: xprt_connect() don't abort the task if the transport isn't bound") Signed-off-by: NeilBrown <neilb@suse.de> Reviewed-by: Benjamin Coddington <bcodding@redhat.com> Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/xprtsock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 02f651f85e73..190dae11f634 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -2351,6 +2351,7 @@ static void xs_tcp_setup_socket(struct work_struct *work)
case -EHOSTUNREACH:
case -EADDRINUSE:
case -ENOBUFS:
+ case -ENOTCONN:
break;
default:
printk("%s: connect returned unhandled error %d\n",