Release rcu lock to reap dead pool workqueue. Signed-off-by: Hillf Danton <hdanton@xxxxxxxx> --- --- d/kernel/workqueue.c +++ e/kernel/workqueue.c @@ -1409,9 +1409,9 @@ static void __queue_work(int cpu, struct if (unlikely(wq->flags & __WQ_DRAINING) && WARN_ON_ONCE(!is_chained_work(wq))) return; - - rcu_read_lock(); retry: + rcu_read_lock(); + /* pwq which will be used unless @work is executing elsewhere */ if (wq->flags & WQ_UNBOUND) { if (req_cpu == WORK_CPU_UNBOUND) @@ -1458,6 +1458,7 @@ retry: if (unlikely(!pwq->refcnt)) { if (wq->flags & WQ_UNBOUND) { spin_unlock(&pwq->pool->lock); + rcu_read_unlock(); cpu_relax(); goto retry; }