From: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
To: trondmy@kernel.org, anna@kernel.org
Cc: skinsbursky@parallels.com, linux-nfs@vger.kernel.org,
linux-kernel@vger.kernel.org,
syzbot+8cbdf9aa6c281a4e6bbe@syzkaller.appspotmail.com
Subject: Re: [PATCH] NFS: Destroy callback transports on initialization failure
Date: Sat, 14 Nov 2026 04:36:19 +0530 [thread overview]
Message-ID: <aveX66UdPwMrs49E@user> (raw)
In-Reply-To: <20261108210452.84550-1-pavankumaryalagada@gmail.com>
On Mon, Nov 09, 2026 at 02:34:52AM +0530, pavankumaryalagada@gmail.com wrote:
> From: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
>
> During NFSv4 callback initialization, the IPv4 listener is created
> successfully, but the IPv6 listener fails to start. The error path
> returns without cleaning up the IPv4 listener. As a result, the
> transport remains attached to serv->sv_permsocks, causing svc_destroy()
> to trigger a warning.
>
> Call svc_xprt_destroy_all() when IPv6 listener creation fails to
> close any transports that were already created. This ensures all
> transports are cleaned up before the service is destroyed.
>
> Reported-by: syzbot+8cbdf9aa6c281a4e6bbe@syzkaller.appspotmail.com
> Link: https://lore.kernel.org/all/6aee17c4.8be4ead1.3b45e1.0199.GAE@google.com/T/
> Fixes: c946556b8749 ("NFS: move per-net callback thread initialization to nfs_callback_up_net()")
> Signed-off-by: Yalagada Pavan Kumar <pavankumaryalagada@gmail.com>
> ---
> Note: Tested by syzbot using the reproducer. The kernel built successfully,
> and the original WARNING was no longer reproduced.
> ---
> fs/nfs/callback.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
> index bc282b744f34..29134e2c56cd 100644
> --- a/fs/nfs/callback.c
> +++ b/fs/nfs/callback.c
> @@ -61,9 +61,11 @@ static int nfs4_callback_up_net(struct svc_serv *serv, struct net *net)
> dprintk("NFS: Callback listener port = %u (af %u, net %x)\n",
> nn->nfs_callback_tcpport6, PF_INET6, net->ns.inum);
> } else if (ret != -EAFNOSUPPORT)
> - goto out_err;
> + goto out_destroy_xprts;
> return 0;
>
> +out_destroy_xprts:
> + svc_xprt_destroy_all(serv, net, false);
Hi,
Could you please review this when you have a moment?
Thanks,
Pavan
> out_err:
> return (ret) ? ret : -ENOMEM;
> }
> --
> 2.43.0
>
prev parent reply other threads:[~2026-11-13 23:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 21:04 pavankumaryalagada
2026-11-13 23:06 ` Yalagada Pavan Kumar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aveX66UdPwMrs49E@user \
--to=pavankumaryalagada@gmail.com \
--cc=anna@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=skinsbursky@parallels.com \
--cc=syzbot+8cbdf9aa6c281a4e6bbe@syzkaller.appspotmail.com \
--cc=trondmy@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®