[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8555e0cb4774bc1b225fe628cc4e07eb3c6e2a40.camel@hammerspace.com>
Date: Mon, 17 Mar 2025 21:28:03 +0000
From: Trond Myklebust <trondmy@...merspace.com>
To: "horms@...nel.org" <horms@...nel.org>, "davem@...emloft.net"
<davem@...emloft.net>, "chuck.lever@...cle.com" <chuck.lever@...cle.com>,
"okorniev@...hat.com" <okorniev@...hat.com>, "anna@...nel.org"
<anna@...nel.org>, "kuba@...nel.org" <kuba@...nel.org>, "tom@...pey.com"
<tom@...pey.com>, "Dai.Ngo@...cle.com" <Dai.Ngo@...cle.com>, "neilb@...e.de"
<neilb@...e.de>, "jlayton@...nel.org" <jlayton@...nel.org>,
"edumazet@...gle.com" <edumazet@...gle.com>, "pabeni@...hat.com"
<pabeni@...hat.com>
CC: "josef@...icpanda.com" <josef@...icpanda.com>, "linux-nfs@...r.kernel.org"
<linux-nfs@...r.kernel.org>, "bcodding@...hat.com" <bcodding@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH RFC 9/9] sunrpc: don't upgrade passive net reference in
xs_create_sock
On Mon, 2025-03-17 at 17:00 -0400, Jeff Layton wrote:
> With the move to having sunrpc client xprts not hold active
> references
> to the net namespace, there is no need to upgrade the socket's
> reference
> in xs_create_sock. Just keep the passive reference instead.
>
> Signed-off-by: Jeff Layton <jlayton@...nel.org>
> ---
> net/sunrpc/xprtsock.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
> index
> 83cc095846d356f24aed26e2f98525662a6cff1f..0c3d7552f772d6f8477a3aed8f0
> c513b62cdf589 100644
> --- a/net/sunrpc/xprtsock.c
> +++ b/net/sunrpc/xprtsock.c
> @@ -1941,9 +1941,6 @@ static struct socket *xs_create_sock(struct
> rpc_xprt *xprt,
> goto out;
> }
>
> - if (protocol == IPPROTO_TCP)
> - sk_net_refcnt_upgrade(sock->sk);
> -
> filp = sock_alloc_file(sock, O_NONBLOCK, NULL);
> if (IS_ERR(filp))
> return ERR_CAST(filp);
>
Is this not going to reintroduce the bug described by
https://lore.kernel.org/netdev/67b72aeb.050a0220.14d86d.0283.GAE@google.com/T/#u
?
As I understand it, the problem has nothing to do with whether or not
NFS or the RPC layer holds a reference to the net namespace, but rather
whether there are still packets in the socket queues at the time when
that net namespace is being freed.
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trond.myklebust@...merspace.com
Powered by blists - more mailing lists