Repository navigation
Commit 234a503
sched: Reject CPU affinity changes based on task_cpu_possible_mask()
Reject explicit requests to change the affinity mask of a task via
set_cpus_allowed_ptr() if the requested mask is not a subset of the
mask returned by task_cpu_possible_mask(). This ensures that the
'cpus_mask' for a given task cannot contain CPUs which are incapable of
executing it, except in cases where the affinity is forced.
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>
Reviewed-by: Quentin Perret <qperret@google.com>
Link: https://lore.kernel.org/r/20210730112443.23245-6-will@kernel.org1 parent 97c0054 commit 234a503
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2709 | 2709 | | |
2710 | 2710 | | |
2711 | 2711 | | |
| 2712 | + | |
2712 | 2713 | | |
| 2714 | + | |
2713 | 2715 | | |
2714 | 2716 | | |
2715 | 2717 | | |
| |||
2718 | 2720 | | |
2719 | 2721 | | |
2720 | 2722 | | |
2721 | | - | |
| 2723 | + | |
2722 | 2724 | | |
2723 | 2725 | | |
2724 | 2726 | | |
| |||
2732 | 2734 | | |
2733 | 2735 | | |
2734 | 2736 | | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
2735 | 2742 | | |
2736 | 2743 | | |
2737 | 2744 | | |
| |||
0 commit comments