]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
um: Set parent-death signal for ubd io thread/process
authorTiwei Bie <tiwei.btw@antgroup.com>
Thu, 24 Oct 2024 14:28:26 +0000 (22:28 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 25 Oct 2024 09:34:55 +0000 (11:34 +0200)
The ubd io 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-3-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/drivers/ubd_kern.c

index 7f28ec1929dc0b54341f43aa6497202c8b5f44f0..2b8d04e67600ad7fcbff0d2f1f998f009a20a8b5 100644 (file)
@@ -1499,6 +1499,7 @@ int io_thread(void *arg)
 {
        int n, count, written, res;
 
+       os_set_pdeathsig();
        os_fix_helper_signals();
 
        while(1){