diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-08-28 15:55:52 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2021-09-09 11:27:23 +0200 |
commit | 868ad33bfa3bf39960982682ad3a0f8ebda1656e (patch) | |
tree | a45decc6622e9ca567a6b9b5ae726df9cc0bcbc3 /drivers/char | |
parent | 9848417926353daa59d2b05eb26e185063dbac6e (diff) | |
download | linux-stable-868ad33bfa3bf39960982682ad3a0f8ebda1656e.tar.gz linux-stable-868ad33bfa3bf39960982682ad3a0f8ebda1656e.tar.bz2 linux-stable-868ad33bfa3bf39960982682ad3a0f8ebda1656e.zip |
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: ae7927023243 ("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@tglx
Diffstat (limited to 'drivers/char')
0 files changed, 0 insertions, 0 deletions