linux-stable/net/sunrpc
NeilBrown 9b8a8e5e81 nfsd: don't allow nfsd threads to be signalled.
commit 3903902401 upstream.

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 3ebdbe5203 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-25 16:20:16 +02:00
..
auth_gss Revert "SUNRPC: Use RMW bitops in single-threaded hot paths" 2024-04-10 16:19:25 +02:00
xprtrdma Revert "SUNRPC: Use RMW bitops in single-threaded hot paths" 2024-04-10 16:19:25 +02:00
Kconfig
Makefile sunrpc: Create a sunrpc directory under /sys/kernel/ 2021-07-08 14:03:23 -04:00
addr.c net: sunrpc: Fix an off by one in rpc_sockaddr2uaddr() 2024-03-26 18:21:33 -04:00
auth.c sunrpc: fix expiry of auth creds 2022-08-25 11:40:05 +02:00
auth_null.c
auth_unix.c
backchannel_rqst.c SUNRPC: Reinitialise the backchannel request buffers before reuse 2022-08-25 11:40:05 +02:00
cache.c SUNRPC: improve error response to over-size gss credential 2021-09-03 13:38:11 -04:00
clnt.c sunrpc: add a struct rpc_stats arg to rpc_create_args 2024-05-17 11:50:45 +02:00
debugfs.c NFS Client Updates for Linux 5.15 2021-09-04 10:25:26 -07:00
fail.h SUNRPC: Server-side disconnect injection 2021-08-20 13:50:33 -04:00
netns.h
rpc_pipe.c fsnotify: fix fsnotify hooks in pseudo filesystems 2022-02-01 17:27:01 +01:00
rpcb_clnt.c SUNRPC: Add an IS_ERR() check back to where it was 2023-11-28 16:56:21 +00:00
sched.c SUNRPC: remove the maximum number of retries in call_bind_status 2023-05-11 23:00:37 +09:00
socklib.c
socklib.h
stats.c
sunrpc.h
sunrpc_syms.c sunrpc: add IDs to multipath 2021-07-08 14:03:23 -04:00
svc.c Revert "SUNRPC: Use RMW bitops in single-threaded hot paths" 2024-04-10 16:19:25 +02:00
svc_xprt.c nfsd: don't allow nfsd threads to be signalled. 2024-05-25 16:20:16 +02:00
svcauth.c SUNRPC: Add svc_rqst::rq_auth_stat 2021-08-10 14:18:35 -04:00
svcauth_unix.c sunrpc: only free unix grouplist after RCU settles 2023-04-13 16:48:19 +02:00
svcsock.c nfsd: fix double fget() bug in __write_ports_addfd() 2024-04-10 16:19:28 +02:00
sysctl.c
sysfs.c SUNRPC: Fix null-ptr-deref when xps sysfs alloc failed 2022-11-10 18:15:26 +01:00
sysfs.h SUNRPC: take a xprt offline using sysfs 2021-07-08 14:03:24 -04:00
timer.c
xdr.c NFSD: Refactor common code out of dirlist helpers 2024-04-10 16:19:17 +02:00
xprt.c SUNRPC: Ensure we flush any closed sockets before xs_xprt_free() 2022-05-18 10:26:57 +02:00
xprtmultipath.c SUNRPC: Fix a suspicious RCU usage warning 2024-02-23 08:54:40 +01:00
xprtsock.c SUNRPC: fix shutdown of NFS TCP client socket 2023-04-05 11:24:55 +02:00