summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/kthread.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/kthread.c b/kernel/kthread.c
index bf6eff073cd4..1406efbdc427 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -622,6 +622,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.