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 prev parent reply other threads:[~2026-09-10 21:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 8:45 [PATCH] sched_ext: Close the pre-enable ops error claim window Qiurong Fang
2026-09-10 9:01 ` sashiko-bot
2026-09-10 21:40 ` Tejun Heo [this message]
2026-09-11 2:42 ` [PATCH v2] " Qiurong Fang
2026-09-11 15:24 ` Tejun Heo
2026-09-12 13:15 ` [PATCH v3] " Qiurong Fang
2026-09-13 15:59 ` 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.