From nobody Thu Dec 18 15:31:51 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85AA3CDB47E for ; Wed, 18 Oct 2023 08:31:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344677AbjJRIb5 (ORCPT ); Wed, 18 Oct 2023 04:31:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344664AbjJRIbx (ORCPT ); Wed, 18 Oct 2023 04:31:53 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC9F7BA; Wed, 18 Oct 2023 01:31:51 -0700 (PDT) Date: Wed, 18 Oct 2023 08:31:49 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1697617910; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p1eHh83Sg5uz33qMvHr/Qg2yAhdWF/K7xokZDEP7HJM=; b=qHNxPEK8a8M+NaT/1mAM4eDzdD5BZJvbi9C+kk/yOZ7AsiRw/YWc6A08x75cTMOca8wd6G +SUCKqdkj4LnabgzZqPbLZL1enDiEHLpM+KUQ+kqvK+YLBGAi2/px3VD2pVP5wJph52OuQ mbeEnkNRsWVnQSXUYkTS5cSNmzjdwOgXRg7mvgoLmclx8dvmj/uClFpVEHmvIzXwyBZWqA qFKUZW/dMO7f2cqON6HCIGt+zo84OKs7BQxLqrF9pcyyy2qeDhuCOK8FbtGhLhF5V3uFUy hDHsI89cHmyrVJnl7yWiXQFXvw9V/GicwvLimwzF2Vk8rfnuo4QwPUjKjOAgGQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1697617910; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=p1eHh83Sg5uz33qMvHr/Qg2yAhdWF/K7xokZDEP7HJM=; b=9r7v6E9ExhnkSmMK3sOvJSkBTewahkkGEu8jYR1JubHMLh1LbAj+fTF0WfXJzmh34kVrD7 p0hWgRmxAgp/hgBA== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/urgent] sched/eevdf: Fix heap corruption more Cc: 0599jiangyc@gmail.com, Dmitry Safonov <0x7f454c46@gmail.com>, "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <169761790955.3135.2302450117444631157.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/urgent branch of tip: Commit-ID: d2929762cc3f85528b0ca12f6f63c2a714f24778 Gitweb: https://git.kernel.org/tip/d2929762cc3f85528b0ca12f6f63c2a71= 4f24778 Author: Peter Zijlstra AuthorDate: Tue, 17 Oct 2023 16:59:47 +02:00 Committer: Peter Zijlstra 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@gmail.com Reported-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: Peter Zijlstra (Intel) Tested-by: Dmitry Safonov <0x7f454c46@gmail.com> Link: https://bugzilla.kernel.org/show_bug.cgi?id=3D218020 Link: https://lkml.kernel.org/r/CAJwJo6ZGXO07%3DQvW4fgQfbsDzQPs9xj5sAQ1zp%3= DmAyPMNbHYww%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, st= ruct sched_entity *se, */ deadline =3D div_s64(deadline * old_weight, weight); se->deadline =3D se->vruntime + deadline; - min_deadline_cb_propagate(&se->run_node, NULL); + if (se !=3D cfs_rq->curr) + min_deadline_cb_propagate(&se->run_node, NULL); } =20 #ifdef CONFIG_SMP