Skip to content

Commit c71370b

Browse files
committed
Merge tag 'interrupting_kthread_stop-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
Pull kthread update from Eric Biederman: "Break out of wait loops on kthread_stop() This is a small tweak to kthread_stop so it breaks out of interruptible waits, that don't explicitly test for kthread_stop. These interruptible waits occassionaly occur in kernel threads do to code sharing" * tag 'interrupting_kthread_stop-for-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: signal: break out of wait loops on kthread_stop()
2 parents 4899a36 + a7c01fa commit c71370b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/kthread.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,7 @@ int kthread_stop(struct task_struct *k)
704704
kthread = to_kthread(k);
705705
set_bit(KTHREAD_SHOULD_STOP, &kthread->flags);
706706
kthread_unpark(k);
707+
set_tsk_thread_flag(k, TIF_NOTIFY_SIGNAL);
707708
wake_up_process(k);
708709
wait_for_completion(&kthread->exited);
709710
ret = kthread->result;

0 commit comments

Comments
 (0)