]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
kernel: Remove signal hacks for vhost_tasks
authorMike Christie <michael.christie@oracle.com>
Sat, 16 Mar 2024 00:47:07 +0000 (19:47 -0500)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 22 May 2024 12:31:15 +0000 (08:31 -0400)
This removes the signal/coredump hacks added for vhost_tasks in:

Commit f9010dbdce91 ("fork, vhost: Use CLONE_THREAD to fix freezer/ps regression")

When that patch was added vhost_tasks did not handle SIGKILL and would
try to ignore/clear the signal and continue on until the device's close
function was called. In the previous patches vhost_tasks and the vhost
drivers were converted to support SIGKILL by cleaning themselves up and
exiting. The hacks are no longer needed so this removes them.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
Message-Id: <20240316004707.45557-10-michael.christie@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
fs/coredump.c
kernel/exit.c
kernel/signal.c

index be6403b4b14b6a26e611398f0903244d1af96343..8eae24afb3cb911ac564d9e29e9a1494e1082b92 100644 (file)
@@ -371,9 +371,7 @@ static int zap_process(struct task_struct *start, int exit_code)
                if (t != current && !(t->flags & PF_POSTCOREDUMP)) {
                        sigaddset(&t->pending.signal, SIGKILL);
                        signal_wake_up(t, 1);
-                       /* The vhost_worker does not particpate in coredumps */
-                       if ((t->flags & (PF_USER_WORKER | PF_IO_WORKER)) != PF_USER_WORKER)
-                               nr++;
+                       nr++;
                }
        }
 
index 41a12630cbbc9cd80b6b5a154041c514b46ad3fe..fca3a32349541c4c722cb44c6eb869f4b1abbee5 100644 (file)
@@ -414,10 +414,7 @@ static void coredump_task_exit(struct task_struct *tsk)
        tsk->flags |= PF_POSTCOREDUMP;
        core_state = tsk->signal->core_state;
        spin_unlock_irq(&tsk->sighand->siglock);
-
-       /* The vhost_worker does not particpate in coredumps */
-       if (core_state &&
-           ((tsk->flags & (PF_IO_WORKER | PF_USER_WORKER)) != PF_USER_WORKER)) {
+       if (core_state) {
                struct core_thread self;
 
                self.task = current;
index 7bdbcf1b78d0fa0d9f3fbde4b61e31ca5595f453..41d5cbccab2aa0bda22657014b5a696b7278a9a3 100644 (file)
@@ -1375,9 +1375,7 @@ int zap_other_threads(struct task_struct *p)
 
        for_other_threads(p, t) {
                task_clear_jobctl_pending(t, JOBCTL_PENDING_MASK);
-               /* Don't require de_thread to wait for the vhost_worker */
-               if ((t->flags & (PF_IO_WORKER | PF_USER_WORKER)) != PF_USER_WORKER)
-                       count++;
+               count++;
 
                /* Don't bother with already dead threads */
                if (t->exit_state)