tracing: Reject invalid preemptirq_delay_test CPU affinity

preemptirq_delay_test accepts cpu_affinity as a module parameter and,
when it is non-negative, writes that CPU directly into a temporary
cpumask from the worker thread.  Values outside nr_cpu_ids can set a bit
outside the allocated cpumask before the test reports a normal affinity
error.

Validate the requested CPU in preemptirq_delay_run() before setting it
in the temporary cpumask.  Invalid affinity requests are reported by
the test thread and skipped before cpumask_set_cpu() can touch an
out-of-range bit.

Link: https://patch.msgid.link/20260628131021.2208632.6a5c6c959813.preemptirq-delay-test-invalid-cpu-affinity@trailofbits.com
Assisted-by: Codex:gpt-5.5-cyber-preview
Signed-off-by: Samuel Moelius <sam.moelius@trailofbits.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
Samuel Moelius 2026-06-28 13:10:22 +00:00 • committed by Steven Rostedt
commit 693dc27c52