Re: [PATCH v4 sched_ext/for-7.3 20/40] sched_ext: Stop resolving a disabled scheduler's programs
From: Tejun Heo
Date: Thu Jul 09 2026 - 18:30:38 EST
On Wed, 08 Jul 2026 21:55:20 +0000, sashiko-bot@xxxxxxxxxx wrote:
> - [High] The `sch->dead` check was omitted from the
> `!CONFIG_EXT_SUB_SCHED` fallback version of `scx_prog_sched()`, leaving
> the Use-After-Exit hazard unfixed.
Good catch. The =n stub skips the dead check, making the post-exit drain
this patch adds a no-op there. Fixed in v5 - the stub now returns NULL
for a dead root like the =y version.
> This is a pre-existing issue, but can a parent scheduler bypass the
> newly introduced dead flag and invoke a torn-down child scheduler's
> ops.dispatch()?
Not reachable: scx_sub_disable() unlinks the child from the sub hash
before setting dead, so scx_find_sub_sched() already returns NULL in the
claimed window and scx_bpf_sub_dispatch() bails before ops.dispatch().
That path is gated by hash membership; a dead check there would be
redundant.
Thanks.
--
tejun