diff options
| author | Patrick McHardy <kaber@trash.net> | 2011-06-16 17:01:10 +0200 |
|---|---|---|
| committer | Patrick McHardy <kaber@trash.net> | 2011-06-16 17:01:10 +0200 |
| commit | 1f2d9c9dd8276b1c19ef80e6d8059fe47506d4c3 (patch) | |
| tree | c5a3439c1c140eb87f7e3ece2e1148dece037b4f /kernel/workqueue.c | |
| parent | a7fed7620b6eeaba98a558df46bb50a31828b462 (diff) | |
| parent | 520b2756d9414cb6b0f6fc70714e95ee9248ebf4 (diff) | |
Merge branch 'master' of /repos/git/net-next-2.6
Diffstat (limited to 'kernel/workqueue.c')
| -rw-r--r-- | kernel/workqueue.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 8859a41806dd..0400553f0d04 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(); } } @@ -2860,9 +2866,7 @@ static int alloc_cwqs(struct workqueue_struct *wq) } } - /* just in case, make sure it's actually aligned - * - this is affected by PERCPU() alignment in vmlinux.lds.S - */ + /* just in case, make sure it's actually aligned */ BUG_ON(!IS_ALIGNED(wq->cpu_wq.v, align)); return wq->cpu_wq.v ? 0 : -ENOMEM; } |
