[PATCH 0/2] sched: Fix SCHED_FLAG_KEEP_PARAMS side effects
From: Andrea Righi
Date: Thu Jul 30 2026 - 01:51:52 EST
SCHED_FLAG_KEEP_PARAMS allows sched_setattr() to update generic task
attributes while retaining the task's existing scheduling parameters and
class.
Two paths in __sched_setscheduler() still act on the requested policy
before the guarded parameter update. One marks the operation as a class
change and invokes class transition callbacks even though the class remains
unchanged. The other performs deadline admission control and can account
bandwidth for a non-deadline task that never enters the deadline class.
Prevent both side effects when SCHED_FLAG_KEEP_PARAMS is set.
Andrea Righi (2):
sched: Skip class callbacks with SCHED_FLAG_KEEP_PARAMS
sched/deadline: Skip bandwidth accounting with SCHED_FLAG_KEEP_PARAMS
kernel/sched/syscalls.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
base-commit: bafb78898eb70fcaa979608a2d7ae9bad86124a1