Skip to content

Commit c861cac

Browse files
Mukesh Ojhapaulmckrcu
authored andcommitted
stop_machine: Fix rcu_momentary_eqs() call in multi_cpu_stop()
The multi_cpu_stop() contains a loop that can initially be executed with interrupts enabled (in the MULTI_STOP_NONE and MULTI_STOP_PREPARE states). Interrupts are guaranteed to be once the MULTI_STOP_DISABLE_IRQ state is reached. Unfortunately, the rcu_momentary_eqs() function that is currently invoked on each pass through this loop requires that interrupts be disabled. This commit therefore moves this call to rcu_momentary_eqs() to the body of the "else if (curstate > MULTI_STOP_PREPARE)" portion of the loop, thus guaranteeing that interrupts will be disabled on each call, as required. Kudos to 朱恺乾 (Kaiqian) for noting that this had not made it to mainline. [ paulmck: Update from rcu_momentary_dyntick_idle() to rcu_momentary_eqs(). ] Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Mukesh Ojha <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 40384c8 commit c861cac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/stop_machine.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,8 @@ static int multi_cpu_stop(void *data)
250250
* be detected and reported on their side.
251251
*/
252252
touch_nmi_watchdog();
253+
rcu_momentary_eqs();
253254
}
254-
rcu_momentary_eqs();
255255
} while (curstate != MULTI_STOP_EXIT);
256256

257257
local_irq_restore(flags);

0 commit comments

Comments
 (0)