Commit 868ad33
sched: Prevent balance_push() on remote runqueues
sched_setscheduler() and rt_mutex_setprio() invoke the run-queue balance
callback after changing priorities or the scheduling class of a task. The
run-queue for which the callback is invoked can be local or remote.
That's not a problem for the regular rq::push_work which is serialized with
a busy flag in the run-queue struct, but for the balance_push() work which
is only valid to be invoked on the outgoing CPU that's wrong. It not only
triggers the debug warning, but also leaves the per CPU variable push_work
unprotected, which can result in double enqueues on the stop machine list.
Remove the warning and validate that the function is invoked on the
outgoing CPU.
Fixes: ae79270 ("sched: Optimize finish_lock_switch()")
Reported-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/87zgt1hdw7.ffs@tglx1 parent 9848417 commit 868ad33
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8523 | 8523 | | |
8524 | 8524 | | |
8525 | 8525 | | |
8526 | | - | |
8527 | 8526 | | |
8528 | 8527 | | |
8529 | 8528 | | |
8530 | 8529 | | |
8531 | 8530 | | |
8532 | 8531 | | |
8533 | 8532 | | |
8534 | | - | |
| 8533 | + | |
| 8534 | + | |
8535 | 8535 | | |
8536 | | - | |
| 8536 | + | |
8537 | 8537 | | |
8538 | 8538 | | |
8539 | 8539 | | |
| |||
0 commit comments