mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Dmitry Safonov <0x7f454c46@gmail.com>
Cc: mingo@kernel.org, frederic@kernel.org,
	linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
	tglx@linutronix.de,
	syzbot <syzbot+3908cdfd655fd839c82f@syzkaller.appspotmail.com>
Subject: Re: [syzbot] [kernel?] KASAN: slab-use-after-free Read in reweight_entity
Date: Tue, 17 Oct 2023 21:07:10 +0200	[thread overview]
Message-ID: <20231017190710.GF1599@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <CAJwJo6ZGXO07=QvW4fgQfbsDzQPs9xj5sAQ1zp=mAyPMNbHYww@mail.gmail.com>

On Tue, Oct 17, 2023 at 07:58:56PM +0100, Dmitry Safonov wrote:
> FWIW,
> Managed to locally reproduce it twice on 58720809f527 (tag: v6.6-rc6)
> Linux 6.6-rc6 + TCP-AO patches on the top.
> (but can't reproduce reliably at will)
> 
> [dima@Mindolluin linux-tcp-ao]$ ./scripts/faddr2line vmlinux
> reweight_entity+0x3b0/0x490
> reweight_entity+0x3b0/0x490:

Could you please try:

  https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?h=sched/urgent&id=a3b75dce9d9ae4510ea75b655567f50622f48706


---
Subject: sched/eevdf: Fix heap corruption more
From: Peter Zijlstra <peterz@infradead.org>
Date: Tue Oct 17 16:59:47 CEST 2023

Because someone is a flaming idiot... :/

Fixes: 8dafa9d0eb1a ("sched/eevdf: Fix min_deadline heap integrity")
Reported-by: 0599jiangyc@gmail.com
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218020
---
 kernel/sched/fair.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3699,7 +3699,8 @@ static void reweight_entity(struct cfs_r
 		 */
 		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

  reply	other threads:[~2023-10-17 19:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16  7:38 syzbot
2023-10-17 18:58 ` Dmitry Safonov
2023-10-17 19:07   ` Peter Zijlstra [this message]
2023-10-17 20:16     ` Dmitry Safonov
2024-09-06 10:38 ` [syzbot] syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231017190710.GF1599@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=0x7f454c46@gmail.com \
    --cc=frederic@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=syzbot+3908cdfd655fd839c82f@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome