mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Wanwu Li <liwanwu@kylinos.cn>
Cc: David Vernet <void@manifault.com>,
	Andrea Righi <arighi@nvidia.com>,
	Changwoo Min <changwoo@igalia.com>,
	sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v2] sched_ext: Fix NULL sched deref in kfunc sub-sched error paths
Date: Wed, 2 Sep 2026 09:39:59 -1000	[thread overview]
Message-ID: <aph7j7b_rqqqcSwR@slm.duckdns.org> (raw)
In-Reply-To: <d819e8358fffc09015feffad57794f7c@kernel.org>

On Wed, Sep 02, 2026 at 09:37:39AM -1000, Tejun Heo wrote:
> > +		scx_error(scx_task_sched_rcu(p) ?: sch,
> > +			  "__scx_bpf_select_cpu_and() must be used");
> 
> As the fallback only triggers for tasks already past sched_ext_dead() (or
> idle tasks), tearing down the root scheduler doesn't make sense. How about
> adding a flag to the root sched and printing a warning once instead?

It'd be fine to just ignore it too. The scx_error() is there to flag cases
where things went obviously wrong. I don't think we'd lose anything
meaningful by just ignoring it when sch can't be determined.

Thanks.

-- 
tejun

  reply	other threads:[~2026-09-02 19:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02 15:36 [PATCH] sched_ext: Fix NULL sched deref in select_cpu_and sub-sched error path Wanwu Li
2026-09-02 16:14 ` Andrea Righi
2026-09-02 16:34   ` liwanwu
2026-09-02 17:07 ` [PATCH v2] sched_ext: Fix NULL sched deref in kfunc sub-sched error paths Wanwu Li
2026-09-02 18:11   ` Andrea Righi
2026-09-02 19:37   ` Tejun Heo
2026-09-02 19:39     ` Tejun Heo [this message]
2026-09-03  6:06 ` [PATCH v3] " Wanwu Li
2026-09-03 17:56   ` Tejun Heo

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=aph7j7b_rqqqcSwR@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=arighi@nvidia.com \
    --cc=changwoo@igalia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liwanwu@kylinos.cn \
    --cc=sched-ext@lists.linux.dev \
    --cc=stable@vger.kernel.org \
    --cc=void@manifault.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

all inboxes | Powered by JetHome®