sched: Split the guts of sched_setaffinity() into a helper function
authorWill Deacon <will@kernel.org>
Fri, 30 Jul 2021 11:24:34 +0000 (12:24 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 20 Aug 2021 10:33:00 +0000 (12:33 +0200)
commitdb3b02ae896e88b6bb7a95c1373602e87e0de84c
tree57598a447946628ffcaead1dc6056634cc8799b7
parentb90ca8badbd11488e5f762346b028666808164e7
sched: Split the guts of sched_setaffinity() into a helper function

In preparation for replaying user affinity requests using a saved mask,
split sched_setaffinity() up so that the initial task lookup and
security checks are only performed when the request is coming directly
from userspace.

Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Valentin Schneider <Valentin.Schneider@arm.com>
Link: https://lore.kernel.org/r/20210730112443.23245-8-will@kernel.org
kernel/sched/core.c