# Re: \[PATCH v11 07/16\] sched: Split the guts of sched\_setaffinity() into a helper function

- From: Peter Zijlstra \<peterz@infradead.org\>
- Date: 2021-08-17 15:41:49 
- List: linux-arm-kernel
- Page: https://ratatoskr.run/linux-arm-kernel/2021/08/1480494
- Thread: https://ratatoskr.run/linux-arm-kernel/2021/07/1463115/t.md

```text
On Fri, Jul 30, 2021 at 12:24:34PM +0100, Will Deacon wrote:
> 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.
> 
> Reviewed-by: Valentin Schneider <redacted>
> Signed-off-by: Will Deacon <will@kernel.org>

Should not sched_setaffinity() update user_cpus_ptr when it isn't NULL,
such that the upcoming relax_compatible_cpus_allowed_ptr() preserve the
full user mask?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
```
