Skip to content

Commit d292976

Browse files
author
Peter Zijlstra
committed
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: 8dafa9d ("sched/eevdf: Fix min_deadline heap integrity") Reported-by: [email protected] Reported-by: Dmitry Safonov <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Tested-by: Dmitry Safonov <[email protected]> Link: https://bugzilla.kernel.org/show_bug.cgi?id=218020 Link: https://lkml.kernel.org/r/CAJwJo6ZGXO07%3DQvW4fgQfbsDzQPs9xj5sAQ1zp%3DmAyPMNbHYww%40mail.gmail.com
1 parent 5872080 commit d292976

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/sched/fair.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3657,7 +3657,8 @@ static void reweight_entity(struct cfs_rq *cfs_rq, struct sched_entity *se,
36573657
*/
36583658
deadline = div_s64(deadline * old_weight, weight);
36593659
se->deadline = se->vruntime + deadline;
3660-
min_deadline_cb_propagate(&se->run_node, NULL);
3660+
if (se != cfs_rq->curr)
3661+
min_deadline_cb_propagate(&se->run_node, NULL);
36613662
}
36623663

36633664
#ifdef CONFIG_SMP

0 commit comments

Comments
 (0)