From: sashiko-bot@kernel.org
To: "Rahad Bhuiya" <rahadbhuiya2021@gmail.com>
Cc: sched-ext@lists.linux.dev, bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next] sched_ext: Reset task fields on exit of an SCX_TASK_READY task
Date: Fri, 06 Nov 2026 14:39:54 +0000 [thread overview]
Message-ID: <sashiko-outbox-201598@kernel.org> (raw)
In-Reply-To: <20261106142818.1475-1-rahadbhuiya2021@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] sched_ext: call to undeclared scx_reset_task_fields() breaks
build
--
commit 64db5de46ee85990aea72e2451a03a9902ada739
Author: Rahad Bhuiya <rahadbhuiya2021@gmail.com>
sched_ext: Reset task fields on exit of an SCX_TASK_READY task
This commit calls scx_reset_task_fields() in __scx_disable_and_exit_task()
when a task is in the SCX_TASK_READY state.
> diff --git a/kernel/sched/ext/ext.c b/kernel/sched/ext/ext.c
> index 0403c46342813..1cb1532512e6a 100644
> --- a/kernel/sched/ext/ext.c
> +++ b/kernel/sched/ext/ext.c
> @@ -4014,6 +4014,7 @@ void __scx_disable_and_exit_task(struct scx_sched *sch, struct task_struct *p)
> args.cancelled = true;
> break;
> case SCX_TASK_READY:
> + scx_reset_task_fields(task_rq(p), p);
[Severity: High]
Does calling scx_reset_task_fields() here break the build when
CONFIG_SCHED_CLASS_EXT is enabled? Commit a298fd5f4ee8 ("sched_ext: Fix
use-after-free of a NONE rescuee leaving its sched while running") is not
present in this tree, so scx_disable_task() still resets task fields inline
and scx_reset_task_fields() is neither declared nor defined.
Even on top of commit a298fd5f4ee8 ("sched_ext: Fix use-after-free of a
NONE rescuee leaving its sched while running"), a task in SCX_TASK_READY is
not under a scheduler's active runtime control (any transition from
SCX_TASK_ENABLED via switched_from_scx() already ran scx_disable_task()),
and calling scx_reset_task_fields() during scx_rehome_task() would zero the
default initial p->scx.slice set by init_scx_entity() or scx_enable().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261106142818.1475-1-rahadbhuiya2021@gmail.com?part=1
next prev parent reply other threads:[~2026-11-06 14:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 14:28 [PATCH bpf-next] sched_ext: Reset task fields on exit of an SCX_TASK_READY task Rahad Bhuiya
2026-11-06 14:39 ` sashiko-bot [this message]
2026-11-06 17:32 ` Tejun Heo
2026-11-06 18:03 ` [PATCH v2] " Rahad Bhuiya
2026-11-06 18:48 ` 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=sashiko-outbox-201598@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=rahadbhuiya2021@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sched-ext@lists.linux.dev \
/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