[PATCH stable 6.12 5/9] um: Set parent-death signal for write_sigio thread/process

Florian Fainelli <[email protected]> Fri, 24 Jul 2026 14:41:15 -0700
Newsgroups org.infradead.lists.linux-um,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kernel.vger.stable
Message-ID <[email protected]>
From: Tiwei Bie <[email protected]>

commit c6c4adee65969218b0b7b13f568fd2c6f2333373 upstream

The write_sigio thread is not really a traditional thread. Set
the parent-death signal for it to ensure that it will be killed
if the UML kernel dies unexpectedly without proper cleanup.

Signed-off-by: Tiwei Bie <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: Florian Fainelli <[email protected]>
---
 arch/um/os-Linux/sigio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/um/os-Linux/sigio.c b/arch/um/os-Linux/sigio.c
index 9e71794839e8..9aac8def4d63 100644
--- a/arch/um/os-Linux/sigio.c
+++ b/arch/um/os-Linux/sigio.c
@@ -55,6 +55,7 @@ static int write_sigio_thread(void *unused)
 	int i, n, respond_fd;
 	char c;
 
+	os_set_pdeathsig();
 	os_fix_helper_signals();
 	fds = &current_poll;
 	while (1) {
-- 
2.34.1