From: Tejun Heo <tj@kernel.org>
To: Qiurong Fang <fangqiurong@kylinos.cn>
Cc: sched-ext@lists.linux.dev, David Vernet <void@manifault.com>,
Andrea Righi <arighi@nvidia.com>,
Changwoo Min <changwoo@igalia.com>,
Emil Tsalapatis <emil@etsalapatis.com>,
linux-kernel@vger.kernel.org, tj@kernel.org
Subject: Re: [PATCH] sched_ext: Close the pre-enable ops error claim window
Date: Thu, 10 Sep 2026 11:40:31 -1000 [thread overview]
Message-ID: <c3b851d927a8be1a0038cb208d33349b@kernel.org> (raw)
In-Reply-To: <20260910084533.2420199-1-fangqiurong@kylinos.cn>
Hello, Qiurong.
On Thu, Sep 10, 2026 at 04:45:33PM +0800, Qiurong Fang wrote:
> + if (scx_tryset_enable_state(SCX_DISABLED, SCX_DISABLING))
> + goto done;
> + break;
Please drop this hunk. Once SCX_ENABLING precedes ops->priv publication,
scx_tryset_enable_state() cannot fail here.
> + if (!scx_tryset_enable_state(SCX_ENABLING, SCX_DISABLED)) {
> + pr_warn("sched_ext: enable raced with a state transition, aborting\n");
> + ret = -EBUSY;
This failure path is also unreachable. The state was checked as SCX_DISABLED
under scx_enable_mutex, and no disable can start before publication. Please
move the existing transition and retain the reset on allocation failure.
Thanks.
--
tejun
next parent reply other threads:[~2026-09-10 21:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260910084533.2420199-1-fangqiurong@kylinos.cn>
2026-09-10 21:40 ` Tejun Heo [this message]
[not found] ` <20260911024256.125287-1-fangqiurong@kylinos.cn>
2026-09-11 15:24 ` [PATCH v2] " 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=c3b851d927a8be1a0038cb208d33349b@kernel.org \
--to=tj@kernel.org \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=emil@etsalapatis.com \
--cc=fangqiurong@kylinos.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=sched-ext@lists.linux.dev \
--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®