mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-10-26 10:57:38 +08:00
allocate_buf_for_compression() stores big_oops_buf and then max_compressed_size, both with plain stores. pstore_dump() runs from kmsg_dump on any CPU, tests big_oops_buf without psinfo_lock and then reads max_compressed_size. Store the size first and publish the buffer with smp_store_release(), paired with smp_load_acquire() in pstore_dump(). Found with MBCheck, a static herd7-based memory consistency checker. Signed-off-by: Jaidev Shastri <jaidevshastri@vt.edu> Link: https://patch.msgid.link/20260921-mb-pstore-v1-1-46f9a6129d58@vt.edu Signed-off-by: Kees Cook <kees@kernel.org>