diff options
Diffstat (limited to 'kernel/workqueue.c')
| -rw-r--r-- | kernel/workqueue.c | 8 |
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) | |||
| 1291 | return true; | 1291 | return true; |
| 1292 | spin_unlock_irq(&gcwq->lock); | 1292 | spin_unlock_irq(&gcwq->lock); |
| 1293 | 1293 | ||
| 1294 | /* CPU has come up in between, retry migration */ | 1294 | /* |
| 1295 | * We've raced with CPU hot[un]plug. Give it a breather | ||
| 1296 | * and retry migration. cond_resched() is required here; | ||
| 1297 | * otherwise, we might deadlock against cpu_stop trying to | ||
| 1298 | * bring down the CPU on non-preemptive kernel. | ||
| 1299 | */ | ||
| 1295 | cpu_relax(); | 1300 | cpu_relax(); |
| 1301 | cond_resched(); | ||
| 1296 | } | 1302 | } |
| 1297 | } | 1303 | } |
| 1298 | 1304 | ||
