Skip to content

Commit

Permalink
kernel: freezer should treat PF_IO_WORKER like PF_KTHREAD for freezing
Browse files Browse the repository at this point in the history
Don't send fake signals to PF_IO_WORKER threads, they don't accept
signals. Just treat them like kthreads in this regard, all they need
is a wakeup as no forced kernel/user transition is needed.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
axboe committed Mar 13, 2021
1 parent 58f9937 commit 15b2219
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/freezer.c
Expand Up @@ -134,7 +134,7 @@ bool freeze_task(struct task_struct *p)
return false;
}

if (!(p->flags & PF_KTHREAD))
if (!(p->flags & (PF_KTHREAD | PF_IO_WORKER)))
fake_signal_wake_up(p);
else
wake_up_state(p, TASK_INTERRUPTIBLE);
Expand Down

0 comments on commit 15b2219

Please sign in to comment.