Files
linux/arch/riscv/kernel
Breno Leitao 95c54cd9c7 riscv: kexec: Initialize kexec_buf struct
The kexec_buf structure was previously declared without initialization.
commit bf454ec31a ("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: bf454ec31a ("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>
2025-09-05 15:31:28 -06:00
..
2025-01-18 12:33:39 -08:00
2025-06-05 11:09:37 -07:00
2025-05-21 16:46:37 +02:00
2023-03-23 08:47:00 -07:00
2025-06-26 16:06:40 +02:00
2024-11-07 14:25:15 -08:00
2022-05-19 19:30:30 +02:00
2024-09-03 07:57:55 -07:00
2025-06-04 15:11:02 -07:00
2025-02-14 13:06:44 -08:00
2025-04-01 07:03:03 +00:00
2025-04-01 07:03:03 +00:00
2021-01-07 19:00:50 -08:00
2025-03-18 12:59:03 +00:00
2025-06-05 14:03:08 -07:00