From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: cel@kernel.org
Cc: Sasha Levin <sashal@kernel.org>,
stable@vger.kernel.org, chuck.lever@oracle.com,
NeilBrown <neilb@suse.de>, Jeff Layton <jlayton@kernel.org>
Subject: Re: [PATCH 5.15] nfsd: don't allow nfsd threads to be signalled.
Date: Sat, 18 May 2024 06:19:35 +0200 [thread overview]
Message-ID: <2024051859-fossil-exposable-722d@gregkh> (raw)
In-Reply-To: <20240517175930.365694-1-cel@kernel.org>
On Fri, May 17, 2024 at 01:59:30PM -0400, cel@kernel.org wrote:
> From: NeilBrown <neilb@suse.de>
>
> [ Upstream commit 3903902401451b1cd9d797a8c79769eb26ac7fe5 ]
>
> The original implementation of nfsd used signals to stop threads during
> shutdown.
> In Linux 2.3.46pre5 nfsd gained the ability to shutdown threads
> internally it if was asked to run "0" threads. After this user-space
> transitioned to using "rpc.nfsd 0" to stop nfsd and sending signals to
> threads was no longer an important part of the API.
>
> In commit 3ebdbe5203a8 ("SUNRPC: discard svo_setup and rename
> svc_set_num_threads_sync()") (v5.17-rc1~75^2~41) we finally removed the
> use of signals for stopping threads, using kthread_stop() instead.
>
> This patch makes the "obvious" next step and removes the ability to
> signal nfsd threads - or any svc threads. nfsd stops allowing signals
> and we don't check for their delivery any more.
>
> This will allow for some simplification in later patches.
>
> A change worth noting is in nfsd4_ssc_setup_dul(). There was previously
> a signal_pending() check which would only succeed when the thread was
> being shut down. It should really have tested kthread_should_stop() as
> well. Now it just does the latter, not the former.
>
> Signed-off-by: NeilBrown <neilb@suse.de>
> Reviewed-by: Jeff Layton <jlayton@kernel.org>
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
> fs/nfs/callback.c | 9 +--------
> fs/nfsd/nfs4proc.c | 5 ++---
> fs/nfsd/nfssvc.c | 12 ------------
> net/sunrpc/svc_xprt.c | 16 ++++++----------
> 4 files changed, 9 insertions(+), 33 deletions(-)
>
> Greg, Sasha - This is the third resend for this fix. Why isn't it
> applied to origin/linux-5.15.y yet?
I only see one previous send, where is the second?
Anyway, we are working to catch up, there's been a few hundred other
commits that were also needed :)
thanks,
greg k-h
next prev parent reply other threads:[~2024-05-18 4:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-17 17:59 [PATCH 5.15] nfsd: don't allow nfsd threads to be signalled cel
2024-05-18 4:19 ` Greg Kroah-Hartman [this message]
2024-05-18 14:50 ` Chuck Lever III
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=2024051859-fossil-exposable-722d@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=cel@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=neilb@suse.de \
--cc=sashal@kernel.org \
--cc=stable@vger.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