public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: limingming3 <limingming890315@gmail.com>
Cc: mingo@redhat.com, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
	vschneid@redhat.com, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, limingming3@lixiang.com
Subject: Re: [PATCH] sched/eevdf: avoid pick_eevdf() returns NULL
Date: Mon, 19 May 2025 11:38:57 +0200	[thread overview]
Message-ID: <20250519093857.GC24938@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20250519092540.3932826-1-limingming3@lixiang.com>

On Mon, May 19, 2025 at 05:25:39PM +0800, limingming3 wrote:
> pick_eevdf() may return NULL, which would triggers NULL pointer
> dereference and crash when best and curr are both NULL.
> 
> There are two cases when curr would be NULL:
> 	1) curr is NULL when enter pick_eevdf
> 	2) we set it to NUll when curr is not on_rq or eligible.
> 
> And when we went to the best = curr flow, the se should never be NULL,
> So when best and curr are both NULL, we'd better set best = se to avoid
> return NULL.
> 
> Below crash is what I encounter very low probability on our server and
> I have not reproduce it, and I also found other people feedback some
> similar crash on lore. So believe the issue is really exit.

If you've found those emails, you'll also have found me telling them
this is the wrong fix.

This (returning NULL) can only happen when the internal state is
broken. Ignoring the NULL will then hide the actual problem.

Can you reproduce on the latest kernels?, 6.1 is so old I don't even
remember what's in there.

  reply	other threads:[~2025-05-19  9:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-19  9:25 [PATCH] sched/eevdf: avoid pick_eevdf() returns NULL limingming3
2025-05-19  9:38 ` Peter Zijlstra [this message]
2025-05-19 12:35   ` Vincent Guittot
2025-05-20  6:43   ` [PATCH] sched/eevdf: Fix NULL pointer dereference in pick_eevdf() limingming3
2025-05-19  9:43 ` [PATCH] sched/eevdf: avoid pick_eevdf() returns NULL kernel test robot

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=20250519093857.GC24938@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=limingming3@lixiang.com \
    --cc=limingming890315@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=stable@vger.kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /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