diff mbox series

[v2,4/4] Revert "SUNRPC: attempt AF_LOCAL connect on setup"

Message ID 20220429173629.621418-4-trondmy@kernel.org (mailing list archive)
State New, archived
Headers show
Series [v2,1/4] SUNRPC: Don't leak sockets in xs_local_connect() | expand

Commit Message

Trond Myklebust April 29, 2022, 5:36 p.m. UTC
From: Trond Myklebust <trond.myklebust@hammerspace.com>

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.

Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
 net/sunrpc/xprtsock.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Trond Myklebust April 30, 2022, 12:56 a.m. UTC | #1
On Fri, 2022-04-29 at 13:36 -0400, trondmy@kernel.org wrote:
> From: Trond Myklebust <trond.myklebust@hammerspace.com>
> 
> 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.
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>

Sorry. I intended to add a

"Reported-by: wanghai (M) <wanghai38@huawei.com>"

That has been added to the version in my "testing" branch.
Wang Hai May 5, 2022, 9:19 a.m. UTC | #2
在 2022/4/30 8:56, Trond Myklebust 写道:
> On Fri, 2022-04-29 at 13:36 -0400, trondmy@kernel.org wrote:
>> From: Trond Myklebust <trond.myklebust@hammerspace.com>
>>
>> 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.
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
> Sorry. I intended to add a
>
> "Reported-by: wanghai (M) <wanghai38@huawei.com>"
>
> That has been added to the version in my "testing" branch.
>
Thanks for your help, I tested it carefully and this patchset can solve 
my problem.

By the way, when can this patchset be applied to linux mainline?
Wang Hai May 5, 2022, 2:54 p.m. UTC | #3
在 2022/4/30 8:56, Trond Myklebust 写道:
> On Fri, 2022-04-29 at 13:36 -0400, trondmy@kernel.org wrote:
>> From: Trond Myklebust <trond.myklebust@hammerspace.com>
>>
>> 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.
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
> Sorry. I intended to add a
>
> "Reported-by: wanghai (M) <wanghai38@huawei.com>"
>
> That has been added to the version in my "testing" branch.
>
Hi, Trond.

If it is just to fix my problem, is it enough to apply only
patch3 and patch4? I tested that if only patch3 and patch4
are applied, the problem seems to be fixed.
diff mbox series

Patch

diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 25b8a8ead56b..650102a9c86a 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -2875,9 +2875,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);