]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
SUNRPC: rpc_clnt_set_transport() must not change the autobind setting
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 24 Mar 2025 23:35:01 +0000 (19:35 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:36:59 +0000 (14:36 +0200)
[ Upstream commit bf9be373b830a3e48117da5d89bb6145a575f880 ]

The autobind setting was supposed to be determined in rpc_create(),
since commit c2866763b402 ("SUNRPC: use sockaddr + size when creating
remote transport endpoints").

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sunrpc/clnt.c

index 7ec5b0bc48ebf04c74400fa217ba6f38a50b76fc..0a4b4870c4d990210f827705adddabecaf1dda9e 100644 (file)
@@ -273,9 +273,6 @@ static struct rpc_xprt *rpc_clnt_set_transport(struct rpc_clnt *clnt,
        old = rcu_dereference_protected(clnt->cl_xprt,
                        lockdep_is_held(&clnt->cl_lock));
 
-       if (!xprt_bound(xprt))
-               clnt->cl_autobind = 1;
-
        clnt->cl_timeout = timeout;
        rcu_assign_pointer(clnt->cl_xprt, xprt);
        spin_unlock(&clnt->cl_lock);