diff options
author | Breno Leitao <leitao@debian.org> | 2025-08-27 03:42:22 -0700 |
---|---|---|
committer | Paul Walmsley <pjw@kernel.org> | 2025-09-05 15:31:28 -0600 |
commit | 95c54cd9c769a198118772e196adfaa1f002e365 (patch) | |
tree | de38370d4934604157859a8a10123a1ec452fa6e /tools/perf/scripts/python/syscall-counts-by-pid.py | |
parent | f4ea67a722e8c9e1fb8109adebb9fb881ff0793a (diff) |
riscv: kexec: Initialize kexec_buf struct
The kexec_buf structure was previously declared without initialization.
commit bf454ec31add ("kexec_file: allow to place kexec_buf randomly")
added a field that is always read but not consistently populated by all
architectures. This un-initialized field will contain garbage.
This is also triggering a UBSAN warning when the uninitialized data was
accessed:
------------[ cut here ]------------
UBSAN: invalid-load in ./include/linux/kexec.h:210:10
load of value 252 is not a valid value for type '_Bool'
Zero-initializing kexec_buf at declaration ensures all fields are
cleanly set, preventing future instances of uninitialized memory being
used.
Fixes: bf454ec31add ("kexec_file: allow to place kexec_buf randomly")
Signed-off-by: Breno Leitao <leitao@debian.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250827-kbuf_all-v1-2-1df9882bb01a@debian.org
Signed-off-by: Paul Walmsley <pjw@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions