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 @@ -1349,8 +1349,16 @@ static void busy_worker_rebind_fn(struct work_struct *work)
13491349 struct worker * worker = container_of (work , struct worker , rebind_work );
13501350 struct global_cwq * gcwq = worker -> pool -> gcwq ;
13511351
1352- if (worker_maybe_bind_and_lock (worker ))
1353- worker_clr_flags (worker , WORKER_REBIND );
1352+ worker_maybe_bind_and_lock (worker );
1353+
1354+ /*
1355+ * %WORKER_REBIND must be cleared even if the above binding failed;
1356+ * otherwise, we may confuse the next CPU_UP cycle or oops / get
1357+ * stuck by calling idle_worker_rebind() prematurely. If CPU went
1358+ * down again inbetween, %WORKER_UNBOUND would be set, so clearing
1359+ * %WORKER_REBIND is always safe.
1360+ */
1361+ worker_clr_flags (worker , WORKER_REBIND );
13541362
13551363 spin_unlock_irq (& gcwq -> lock );
13561364}
You can’t perform that action at this time.
0 commit comments