]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tools/sched_ext: scx_pair: fix stride == 0 crash on single-CPU systems
authorDavid Carlier <devnexen@gmail.com>
Tue, 17 Feb 2026 20:08:36 +0000 (20:08 +0000)
committerTejun Heo <tj@kernel.org>
Wed, 18 Feb 2026 17:03:57 +0000 (07:03 -1000)
commit625be3456b3ced6e2dca6166962c0cf6cc2e546d
tree490e4be1332f4150bb869200df639c40b62736ad
parent55a24d9203979d1cd0196ba1d189860e8b828c2e
tools/sched_ext: scx_pair: fix stride == 0 crash on single-CPU systems

nr_cpu_ids / 2 produces stride 0 on a single-CPU system, which later
causes SCX_BUG_ON(i == j) to fire. Validate stride after option
parsing to also catch invalid user-supplied values via -S.

Signed-off-by: David Carlier <devnexen@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/sched_ext/scx_pair.c