[<prev] [next>] [day] [month] [year] [list]
Message-ID: <169761790955.3135.2302450117444631157.tip-bot2@tip-bot2>
Date: Wed, 18 Oct 2023 08:31:49 -0000
From: "tip-bot2 for Peter Zijlstra" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: 0599jiangyc@...il.com, Dmitry Safonov <0x7f454c46@...il.com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: sched/urgent] sched/eevdf: Fix heap corruption more
The following commit has been merged into the sched/urgent branch of tip:
Commit-ID: d2929762cc3f85528b0ca12f6f63c2a714f24778
Gitweb: https://git.kernel.org/tip/d2929762cc3f85528b0ca12f6f63c2a714f24778
Author: Peter Zijlstra <peterz@...radead.org>
AuthorDate: Tue, 17 Oct 2023 16:59:47 +02:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Wed, 18 Oct 2023 10:22:13 +02:00
sched/eevdf: Fix heap corruption more
Because someone is a flaming idiot... and forgot we have current as
se->on_rq but not actually in the tree itself, and walking rb_parent()
on an entry not in the tree is 'funky' and KASAN complains.
Fixes: 8dafa9d0eb1a ("sched/eevdf: Fix min_deadline heap integrity")
Reported-by: 0599jiangyc@...il.com
Reported-by: Dmitry Safonov <0x7f454c46@...il.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Tested-by: Dmitry Safonov <0x7f454c46@...il.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218020
Link: https://lkml.kernel.org/r/CAJwJo6ZGXO07%3DQvW4fgQfbsDzQPs9xj5sAQ1zp%3DmAyPMNbHYww%40mail.gmail.com
---
kernel/sched/fair.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 061a30a..df348aa 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3657,7 +3657,8 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se,
*/
deadline = div_s64(deadline * old_weight, weight);
se->deadline = se->vruntime + deadline;
- min_deadline_cb_propagate(&se->run_node, NULL);
+ if (se != cfs_rq->curr)
+ min_deadline_cb_propagate(&se->run_node, NULL);
}
#ifdef CONFIG_SMP
Powered by blists - more mailing lists