[PATCH] sunrpc: exclude from freezer when waiting for requests:

From: NeilBrown
Date: Tue May 28 2024 - 19:38:22 EST


Prior to v6.1, the freezer will only wake a kernel thread from an
uninterruptible sleep. Since we changed svc_get_next_xprt() to use and
IDLE sleep the freezer cannot wake it. we need to tell the freezer to
ignore it instead.

Fixes: 9b8a8e5e8129 ("nfsd: don't allow nfsd threads to be signalled.")
Signed-off-by: NeilBrown <neilb@xxxxxxx>
---
net/sunrpc/svc_xprt.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index b19592673eef..12e9293bd12b 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -764,10 +764,12 @@ static struct svc_xprt *svc_get_next_xprt(struct svc_rq=
st *rqstp, long timeout)
clear_bit(RQ_BUSY, &rqstp->rq_flags);
smp_mb__after_atomic();
=20
+ freezer_do_not_count();
if (likely(rqst_should_sleep(rqstp)))
time_left =3D schedule_timeout(timeout);
else
__set_current_state(TASK_RUNNING);
+ freezer_count();
=20
try_to_freeze();
=20
--=20
2.44.0