sched/core: Move initialisation of sched 'params' into sched_setattr()
Commit f4dddf90d58d7 ("sched: Skip priority checks with
SCHED_FLAG_KEEP_PARAMS") initialises the scheduling parameters of the
'struct sched_attr' passed into the sched_setattr(2) system call using
the existing settings when the 'SCHED_FLAG_KEEP_PARAMS' flag is set.
This is necessary so that the subsequent checks in
__sched_setscheduler() don't reject the new attributes based on
uninitialised paramaters.
Move the initialisation of the 'struct sched_attr' parameters out of
the top-level system call handler and into sched_setattr(), where other
callers (such as eBPF programs) can benefit from the same logic.
Signed-off-by: Will Deacon <will@kernel.org>
2 files changed