]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched: Fix faulty assertion in sched_change_end()
authorPeter Zijlstra <peterz@infradead.org>
Wed, 17 Dec 2025 10:24:11 +0000 (11:24 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 17 Dec 2025 10:41:18 +0000 (11:41 +0100)
commit1862d8e264def8425d682f1177e22f9fe7d947ea
tree299f5f899e79e8af05e67371614b17234504d0f1
parent704069649b5bfb7bf1fe32c0281fe9036806a59a
sched: Fix faulty assertion in sched_change_end()

Commit 47efe2ddccb1f ("sched/core: Add assertions to QUEUE_CLASS") added an
assert to sched_change_end() verifying that a class demotion would result in a
reschedule.

As it turns out; rt_mutex_setprio() does not force a resched on class
demontion. Furthermore, this is only relevant to running tasks.

Change the warning into a reschedule and make sure to only do so for running
tasks.

Fixes: 47efe2ddccb1f ("sched/core: Add assertions to QUEUE_CLASS")
Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20251216141725.GW3707837@noisy.programming.kicks-ass.net
kernel/sched/core.c