Patch "[PATCH v2 1/1] s390/signal: fix endless loop in do_signal" has been added to the 5.10-stable tree

<[email protected]>
Newsgroups gmane.linux.debian.devel.kernel,gmane.linux.debian.ports.s390
Message-ID <[email protected]>
This is a note to let you know that I've just added the patch titled

    [PATCH v2 1/1] s390/signal: fix endless loop in do_signal

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     s390-signal-fix-endless-loop-in-do_signal.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From [email protected]  Fri Feb 17 15:04:16 2023
From: Sumanth Korikkar <[email protected]>
Date: Wed, 15 Feb 2023 15:13:24 +0100
Subject: [PATCH v2 1/1] s390/signal: fix endless loop in do_signal
To: [email protected], [email protected], [email protected], [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Message-ID: <[email protected]>

From: Sumanth Korikkar <[email protected]>

No upstream commit exists: the problem addressed here is that 'commit
75309018a24d ("s390: add support for TIF_NOTIFY_SIGNAL")' was backported
to 5.10. This commit is broken, but nobody noticed upstream, since
shortly after s390 converted to generic entry with 'commit 56e62a737028
("s390: convert to generic entry")', which implicitly fixed the problem
outlined below.

Thread flag is set to TIF_NOTIFY_SIGNAL for io_uring work.  The io work
user or syscall calls do_signal when either one of the TIF_SIGPENDING or
TIF_NOTIFY_SIGNAL flag is set.  However, do_signal does consider only
TIF_SIGPENDING signal and ignores TIF_NOTIFY_SIGNAL condition.  This
means get_signal is never invoked  for TIF_NOTIFY_SIGNAL and hence the
flag is not cleared, which results in an endless do_signal loop.

Reference: 'commit 788d0824269b ("io_uring: import 5.15-stable io_uring")'
Fixes: 75309018a24d ("s390: add support for TIF_NOTIFY_SIGNAL")
Cc: [email protected]  # 5.10.162
Acked-by: Heiko Carstens <[email protected]>
Acked-by: Sven Schnelle <[email protected]>
Signed-off-by: Sumanth Korikkar <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 arch/s390/kernel/signal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/s390/kernel/signal.c
+++ b/arch/s390/kernel/signal.c
@@ -472,7 +472,7 @@ void do_signal(struct pt_regs *regs)
 	current->thread.system_call =
 		test_pt_regs_flag(regs, PIF_SYSCALL) ? regs->int_code : 0;
 
-	if (test_thread_flag(TIF_SIGPENDING) && get_signal(&ksig)) {
+	if (get_signal(&ksig)) {
 		/* Whee!  Actually deliver the signal.  */
 		if (current->thread.system_call) {
 			regs->int_code = current->thread.system_call;


Patches currently in stable-queue which might be from [email protected] are

queue-5.10/s390-signal-fix-endless-loop-in-do_signal.patch
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.