summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorPaul Walmsley <pjw@kernel.org>2025-10-18 09:32:12 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-29 14:10:27 +0100
commit66bc9c23072197301768187d83d2a26bfb798365 (patch)
tree91aaef3b53e99067571cdf8cf7fa9a09515c814f /tools/perf/scripts/python/stackcollapse.py
parent8d7b0f5eff7cc23d03e162f7a5e6e13d144d9cb9 (diff)
riscv: hwprobe: avoid uninitialized variable use in hwprobe_arch_id()
[ Upstream commit b7776a802f2f80139f96530a489dd00fd7089eda ] Resolve this smatch warning: arch/riscv/kernel/sys_hwprobe.c:50 hwprobe_arch_id() error: uninitialized symbol 'cpu_id'. This could happen if hwprobe_arch_id() was called with a key ID of something other than MVENDORID, MIMPID, and MARCHID. This does not happen in the current codebase. The only caller of hwprobe_arch_id() is a function that only passes one of those three key IDs. For the sake of reducing static analyzer warning noise, and in the unlikely event that hwprobe_arch_id() is someday called with some other key ID, validate hwprobe_arch_id()'s input to ensure that 'cpu_id' is always initialized before use. Fixes: ea3de9ce8aa280 ("RISC-V: Add a syscall for HW probing") Cc: Evan Green <evan@rivosinc.com> Signed-off-by: Paul Walmsley <pjw@kernel.org> Link: https://lore.kernel.org/r/cf5a13ec-19d0-9862-059b-943f36107bf3@kernel.org Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions