[PATCH sched_ext/for-7.4-fixes v2 0/2] sched_ext: Fix two races between fork and scx_post_fork()

From: Hang Zhengyang

Date: Fri Dec 04 2026 - 22:04:43 EST


This version addresses Tejun's review of v1. There is no functional
change.

- The comments now explain why. The one in switching_to_scx() is
rewritten, and the old comment in scx_post_fork() is folded into the
new one there.
- switched_from_scx() reads the task state once.
- scx_rehome_task() tests the state the same way as patch 1.
- Rebased on for-7.4-fixes 82cd5232be43 and retested as for v1.

v1: https://lore.kernel.org/r/20261204012744.195571-1-hang.zhengyang1010@xxxxxxxxx

Hang Zhengyang (2):
sched_ext: Don't enable or disable a task being forked on class
changes
sched_ext: Don't enable a task twice when it migrates during fork

kernel/sched/ext/ext.c | 48 +++++++++++++++++++++++++++++-------------
kernel/sched/ext/sub.c | 27 ++++++++++++++++++------
2 files changed, 53 insertions(+), 22 deletions(-)


base-commit: 82cd5232be43ff25236c47d7c9126b3f0777359d
--
2.53.0