diff --git a/kernel/kthread.c b/kernel/kthread.c
index 28a6b7ab4a0fa8f810387583e6759075c4ab7936..f97fd01a29325f6d7f2e6d04ad5f87cb9d3577f3 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -704,6 +704,7 @@ int kthread_stop(struct task_struct *k)
 	kthread = to_kthread(k);
 	set_bit(KTHREAD_SHOULD_STOP, &kthread->flags);
 	kthread_unpark(k);
+	set_tsk_thread_flag(k, TIF_NOTIFY_SIGNAL);
 	wake_up_process(k);
 	wait_for_completion(&kthread->exited);
 	ret = kthread->result;