File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1658,8 +1658,16 @@ static void busy_worker_rebind_fn(struct work_struct *work)
1658
1658
struct worker * worker = container_of (work , struct worker , rebind_work );
1659
1659
struct global_cwq * gcwq = worker -> pool -> gcwq ;
1660
1660
1661
- if (worker_maybe_bind_and_lock (worker ))
1662
- worker_clr_flags (worker , WORKER_REBIND );
1661
+ worker_maybe_bind_and_lock (worker );
1662
+
1663
+ /*
1664
+ * %WORKER_REBIND must be cleared even if the above binding failed;
1665
+ * otherwise, we may confuse the next CPU_UP cycle or oops / get
1666
+ * stuck by calling idle_worker_rebind() prematurely. If CPU went
1667
+ * down again inbetween, %WORKER_UNBOUND would be set, so clearing
1668
+ * %WORKER_REBIND is always safe.
1669
+ */
1670
+ worker_clr_flags (worker , WORKER_REBIND );
1663
1671
1664
1672
spin_unlock_irq (& gcwq -> lock );
1665
1673
}
You can’t perform that action at this time.
0 commit comments