Re: [PATCH v2] nfsd: pin the module while a server exists
From: Chuck Lever
Date: Fri Oct 30 2026 - 17:47:08 EST
On Thu, 29 Oct 2026 14:10:05 -0400, Shuangpeng Bai wrote:
> Since commit 924f4fb003ba ("NFSD: convert write_threads to netlink
> command") the server can be started over netlink without mounting the
> nfsd filesystem. But that mount was the only thing pinning the module
> while a server exists (commit f49169c97fce ("NFSD: Remove
> svc_serv_ops::svo_module") removed the per-thread reference).
>
> So when the server has been started via netlink, a plain "rmmod nfsd"
> succeeds while the threads are still running. exit_nfsd() then frees
> struct nfsd_net in unregister_pernet_subsys(), destroys the DRC slab
> and finally unmaps the module text underneath the running threads:
>
> [...]
Applied to nfsd-testing, thanks!
[1/1] nfsd: pin the module while a server exists
commit: d9130c9f6535392d423351ffb5521e7689cae6b6
--
Chuck Lever