]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
um: Set parent-death signal for write_sigio thread/process
authorTiwei Bie <tiwei.btw@antgroup.com>
Thu, 24 Oct 2024 14:28:27 +0000 (22:28 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 25 Oct 2024 09:34:55 +0000 (11:34 +0200)
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 <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20241024142828.2612828-4-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/os-Linux/sigio.c

index 9e71794839e87778d0f90d12c4db9b4c18427761..9aac8def4d6359c647d5385a9d2377262d4e7992 100644 (file)
@@ -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) {