diff options
author | Breno Leitao <leitao@debian.org> | 2025-08-27 03:42:22 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-09-09 19:02:40 +0200 |
commit | 0e2243cc719f35ef03baea3c8525843749a47c2e (patch) | |
tree | 5d810394a61800d1151b2b475cec9dbc28d9fd81 /tools/perf/scripts/python/call-graph-from-sql.py | |
parent | 11d86a69dd7f67733476786f37729959a24fc6f1 (diff) |
riscv: kexec: Initialize kexec_buf struct
commit 95c54cd9c769a198118772e196adfaa1f002e365 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions