aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds2011-04-30 09:15:40 -0700
committerLinus Torvalds2011-04-30 09:15:40 -0700
commit3fd9952df4964fac7d5868ba48eadcc9dae3ba46 (patch)
treeac5ad53b758329fbd5d38972a26fb8380092a649 /kernel
parent1be6a1f89f131e9c3d22f819ec542be9cda8c9e3 (diff)
parent5035b20fa5cd146b66f5f89619c20a4177fb736d (diff)
Merge branch 'fixes-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
* 'fixes-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: fix deadlock in worker_maybe_bind_and_lock() workqueue: Document debugging tricks Fix up trivial spelling conflict in kernel/workqueue.c
Diffstat (limited to 'kernel')
-rw-r--r--kernel/workqueue.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 8859a41806dd..e3378e8d3a5c 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1291,8 +1291,14 @@ __acquires(&gcwq->lock)
return true;
spin_unlock_irq(&gcwq->lock);
- /* CPU has come up in between, retry migration */
+ /*
+ * We've raced with CPU hot[un]plug. Give it a breather
+ * and retry migration. cond_resched() is required here;
+ * otherwise, we might deadlock against cpu_stop trying to
+ * bring down the CPU on non-preemptive kernel.
+ */
cpu_relax();
+ cond_resched();
}
}