]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Revert "SUNRPC: attempt AF_LOCAL connect on setup"
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 29 Apr 2022 16:27:30 +0000 (12:27 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 May 2022 10:25:31 +0000 (12:25 +0200)
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>
net/sunrpc/xprtsock.c

index bd123f1d092308aed6b148d32c6ebc03cf65be12..0ca25e3cc580617f55dfbd0f68f1d0e299fdcde2 100644 (file)
@@ -2826,9 +2826,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);