From: Jeff Layton <jlayton@kernel.org>
To: Slawomir Stepien <sst@poczta.fm>
Cc: syzbot <syzbot@kernel.org>,
syzkaller-bugs@googlegroups.com, Chuck Lever <cel@kernel.org>,
linux-nfs@vger.kernel.org, Lorenzo Bianconi <lorenzo@kernel.org>,
Dai.Ngo@oracle.com, linux-kernel@vger.kernel.org,
neil@brown.name, okorniev@redhat.com, syzbot@lists.linux.dev,
tom@talpey.com
Subject: Re: [PATCH] nfsd: prevent hung task in nfsd_nl_listener_set_doit()
Date: Mon, 24 Aug 2026 08:00:04 -0400 [thread overview]
Message-ID: <15f03f6f3c8a3b0f1d68fcf376fb082e1b4dbc5d.camel@kernel.org> (raw)
In-Reply-To: <aotXzLmrd-B89YRg@nr200>
On Sun, 2026-08-23 at 22:27 +0200, Slawomir Stepien wrote:
> On sie 20, 2026 07:37, Jeff Layton wrote:
> > On Thu, 2026-08-20 at 06:55 +0000, syzbot wrote:
> > > From: Slawomir Stepien <sst@poczta.fm>
> > >
> > > In nfsd_nl_listener_set_doit(), the kernel iterates over all
> > > NFSD_A_SERVER_SOCK_ADDR attributes provided in a netlink message to
> > > configure NFS server listeners. There is currently no limit on the number
> > > of attributes a user can send.
> > >
> > > For each attribute, svc_xprt_create_from_sa() is called, which may
> > > synchronously invoke request_module() to load the corresponding transport
> > > module. If a user provides a large number of invalid transport names,
> > > request_module() is called sequentially for each, taking a massive amount
> > > of time. Since this entire process occurs while holding the global
> > > nfsd_mutex, it blocks other tasks attempting to acquire the mutex and
> > > triggers a hung task timeout:
> > >
> >
> > My LLM latched onto the same explanation, but the request module
> > upcalls are actually quite quick and have some other gates on them that
> > make this problem hard to hit in practice.
>
> Oh, OK. Thanks for clearing that up!
>
> > The real problem is rpcbind registration, which can be quite slow. The
> > fix for that is to make the registration asynchronous, and to not
> > trigger errors on rpcbind registration failure. That's a bigger
> > project, but let us know if you're interested!
>
> I think I'm not that good to do it correctly and in some reasonable time. I might take a 2nd look at
> this and understand the root cause (also, based on your comments in your series) but I think in the
> end it might be too hard for me.
>
Fair enough. It's a non-trivial project, and after some discussion with
Chuck, I'm leaning toward moving most of the rpcbind registration into
userland. That'll mean having to rev the netlink protocol, etc.
Right now, I don't have a timeline for working on this, so we're
probably just going to have to suffer with more syzbot reports until
that can come to fruition.
--
Jeff Layton <jlayton@kernel.org>
prev parent reply other threads:[~2026-08-24 12:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 6:55 [PATCH] nfsd: prevent hung task in nfsd_nl_listener_set_doit() syzbot
2026-08-20 11:37 ` Jeff Layton
2026-08-23 20:27 ` Slawomir Stepien
2026-08-24 12:00 ` Jeff Layton [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=15f03f6f3c8a3b0f1d68fcf376fb082e1b4dbc5d.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=cel@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=sst@poczta.fm \
--cc=syzbot@kernel.org \
--cc=syzbot@lists.linux.dev \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tom@talpey.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.