[tip: sched/core] sched: Switch rq->next_class in proxy_reset_donor()

From: tip-bot2 for John Stultz

Date: Wed Sep 02 2026 - 04:05:54 EST


The following commit has been merged into the sched/core branch of tip:

Commit-ID: 1f880513859336b1d4f9731d3a67d22d0b3b6aad
Gitweb: https://git.kernel.org/tip/1f880513859336b1d4f9731d3a67d22d0b3b6aad
Author: John Stultz <jstultz@xxxxxxxxxx>
AuthorDate: Fri, 07 Aug 2026 03:52:11
Committer: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
CommitterDate: Wed, 02 Sep 2026 09:37:21 +02:00

sched: Switch rq->next_class in proxy_reset_donor()

Similar to commit 04f80f8b12a0 ("sched: Switch rq->next_class on
proxy_resched_idle()"), we should also set the rq->next_class
when we call proxy_reset_donor().

Fixes: f13beb010e4a ("sched: Have try_to_wake_up() handle return-migration for PROXY_WAKING case")
Signed-off-by: John Stultz <jstultz@xxxxxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Link: https://patch.msgid.link/20260807035232.1881495-6-jstultz@xxxxxxxxxx
---
kernel/sched/core.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 0e6306d..f80b607 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3766,6 +3766,7 @@ static inline void proxy_reset_donor(struct rq *rq)
WARN_ON_ONCE(rq->donor == rq->curr);

put_prev_set_next_task(rq, rq->donor, rq->curr);
+ rq->next_class = rq->curr->sched_class;
rq_set_donor(rq, rq->curr);
zap_balance_callbacks(rq);
resched_curr(rq);