Skip to content

Commit

Permalink
Revert "SUNRPC: attempt AF_LOCAL connect on setup"
Browse files Browse the repository at this point in the history
commit a3d0562 upstream.

This reverts commit 7073ea8.

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>
  • Loading branch information
Trond Myklebust authored and gregkh committed May 12, 2022
1 parent 148faea commit 09e7e3a
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions net/sunrpc/xprtsock.c
Expand Up @@ -2848,9 +2848,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);
Expand Down

0 comments on commit 09e7e3a

Please sign in to comment.