Re: [PATCH v5.15.y] nfsd: don't allow nfsd threads to be signalled.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On May 22, 2024, at 11:50 AM, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> On Fri, May 03, 2024 at 01:00:00PM -0400, cel@xxxxxxxxxx wrote:
>> From: NeilBrown <neilb@xxxxxxx>
>> 
>> [ 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@xxxxxxx>
>> Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>
>> Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx>
>> ---
>> 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(-)
> 
> Looks like a clean cherry-pick, right?

IIRC, yes, it was clean.


> Also applied to 6.1.y as we can't have regressions when moving forward.

Thank you!


--
Chuck Lever






[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux