FAILED: patch "[PATCH] sched_ext: Fix exit_task leak on fork failure during enable" failed to apply to 6.18-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 6.18-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y
git checkout FETCH_HEAD
git cherry-pick -x 03506edca637a8465dba9f635c50e9884fbcaf4e
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026090320-scrooge-flashing-ac37@gregkh' --subject-prefix 'PATCH 6.18.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 03506edca637a8465dba9f635c50e9884fbcaf4e Mon Sep 17 00:00:00 2001
From: fangqiurong <[email protected]>
Date: Fri, 14 Aug 2026 11:26:23 +0800
Subject: [PATCH] sched_ext: Fix exit_task leak on fork failure during enable
scx_fork() initializes tasks when scx_init_task_enabled is set, but scx_cancel_fork() only exits them when scx_enabled() is true. A fork that fails in the enable window (between releasing scx_fork_rwsem and setting __scx_enabled) runs ops.init_task() but never ops.exit_task().
Gate scx_cancel_fork() on scx_init_task_enabled.
kernel/sched/ext/ext.c +1 -1
@@ -4163,7 +4163,7 @@ void scx_post_fork(struct task_struct *p)void scx_cancel_fork (struct task_struct *p) { -if (scx_enabled ()) { +if (scx_init_task_enabled) {struct rq *rq;struct rq_flags rf;
Sasha Levin
maintainerPATCH 1/1 sched_ext: Fix exit_task leak on fork failure during enable
From: fangqiurong <[email protected]>
[ Upstream commit 03506edca637a8465dba9f635c50e9884fbcaf4e ]
scx_fork() initializes tasks when scx_init_task_enabled is set, but scx_cancel_fork() only exits them when scx_enabled() is true. A fork that fails in the enable window (between releasing scx_fork_rwsem and setting __scx_enabled) runs ops.init_task() but never ops.exit_task().
Gate scx_cancel_fork() on scx_init_task_enabled.
--- kernel/sched/ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/ext.c +1 -1
@@ -3007,7 +3007,7 @@ void scx_post_fork(struct task_struct *p)void scx_cancel_fork (struct task_struct *p) { -if (scx_enabled ()) { +if (scx_init_task_enabled) {struct rq *rq;struct rq_flags rf;
Signature · 1 line
2.53.0