diff options
| author | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2026-10-29 10:37:53 +0900 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2026-11-20 10:02:34 -0500 |
| commit | 87e0a196153e983a4d95903e7422b7d766cd37cf (patch) | |
| tree | 73e67fa06e65603a1dcdaa80db8a9eb8a3adccc1 /rust/kernel/alloc/kvec/errors.rs | |
| parent | b82178ad9e282e20c3f3636bde5c52143ed5b933 (diff) | |
tracing/filters: Handle out-of-range CPU for OP_NE in cpumask comparison
In filter_pred_##size##_cpumask(), if the event's scalar CPU value is
out of range (cpu >= nr_cpu_ids), it unconditionally returns 0.
However, if the predicate operation is OP_NE (e.g., field != CPUS{0,1}),
an out-of-range CPU cannot match any valid CPU in the user-provided
cpumask and the condition is satisfied. Returning 0 produces a false
negative.
Return "pred->op == OP_NE" instead of 0 when cpu >= nr_cpu_ids.
Cc: stable@vger.kernel.org
Fixes: 3cbec9d7b93d ("tracing/filters: Enable filtering a scalar field by a cpumask")
Link: https://patch.msgid.link/179323787340.740114.14434420599496956193.stgit@devnote2
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
