Andrea Righi 9360dfe4cb sched_ext: Validate prev_cpu in scx_bpf_select_cpu_dfl()
If a BPF scheduler provides an invalid CPU (outside the nr_cpu_ids
range) as prev_cpu to scx_bpf_select_cpu_dfl() it can cause a kernel
crash.

To prevent this, validate prev_cpu in scx_bpf_select_cpu_dfl() and
trigger an scx error if an invalid CPU is specified.

Fixes: f0e1a0643a59b ("sched_ext: Implement BPF extensible scheduler class")
Cc: stable@vger.kernel.org # v6.12+
Signed-off-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2025-03-03 07:55:48 -10:00
..
2024-05-27 17:00:21 +02:00
2024-05-27 17:00:21 +02:00
2025-01-20 20:34:50 +01:00
2025-01-21 11:32:36 -08:00
2025-01-21 11:32:36 -08:00
2024-05-27 17:00:21 +02:00
2024-12-20 15:31:18 +01:00
2024-09-03 15:26:32 +02:00