Message ID | 1464197443-20056-18-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index b838f171..d5c7ca1 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -4570,6 +4570,17 @@ static void rebind_workers(struct worker_pool *pool) pool->attrs->cpumask) < 0); spin_lock_irq(&pool->lock); + + /* + * XXX: CPU hotplug notifiers are weird and can call DOWN_FAILED + * w/o preceding DOWN_PREPARE. Work around it. CPU hotplug is + * being reworked and this can go away in time. + */ + if (!(pool->flags & POOL_DISASSOCIATED)) { + spin_unlock_irq(&pool->lock); + return; + } + pool->flags &= ~POOL_DISASSOCIATED; for_each_pool_worker(worker, pool) {