summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2022-04-29 12:27:30 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-12 12:20:24 +0200
commitc969344fa9355023b219d7ecd3d538b256fffdf8 (patch)
treeecf06e1806097a69c7487243b2d81ec5bb7c5d5f
parent09965f3aa1b524d8ca449de46ad8751c55057de2 (diff)
downloadlinux-stable-c969344fa9355023b219d7ecd3d538b256fffdf8.tar.gz
linux-stable-c969344fa9355023b219d7ecd3d538b256fffdf8.tar.bz2
linux-stable-c969344fa9355023b219d7ecd3d538b256fffdf8.zip
Revert "SUNRPC: attempt AF_LOCAL connect on setup"
commit a3d0562d4dc039bca39445e1cddde7951662e17d upstream. This reverts commit 7073ea8799a8cf73db60270986f14e4aae20fa80. We must not try to connect the socket while the transport is under construction, because the mechanisms to safely tear it down are not in place. As the code stands, we end up leaking the sockets on a connection error. Reported-by: wanghai (M) <wanghai38@huawei.com> Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--net/sunrpc/xprtsock.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 798fbd89ed42..a0a82d9a5900 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -2974,9 +2974,6 @@ static struct rpc_xprt *xs_setup_local(struct xprt_create *args)
}
xprt_set_bound(xprt);
xs_format_peer_addresses(xprt, "local", RPCBIND_NETID_LOCAL);
- ret = ERR_PTR(xs_local_setup_socket(transport));
- if (ret)
- goto out_err;
break;
default:
ret = ERR_PTR(-EAFNOSUPPORT);