diff --git a/kernel/kthread.c b/kernel/kthread.c index 13cfe01ed2fc..51e5a4891b24 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -578,6 +578,8 @@ void kthread_unpark(struct task_struct *k) { struct kthread *kthread = to_kthread(k); + if (!test_bit(KTHREAD_SHOULD_PARK, &kthread->flags)) + return; /* * Newly created kthread was parked when the CPU was offline. * The binding was lost and we need to set it again.