diff options
| author | Andrea Parri <parri.andrea@gmail.com> | 2026-09-21 22:23:15 +0200 |
|---|---|---|
| committer | Kees Cook <kees@kernel.org> | 2026-09-21 14:37:07 -0700 |
| commit | 70fec428c845216da98041b1ae9f16a8f54b3d68 (patch) | |
| tree | 989c70d0c70881910df2746c5ffeb3b3a1de2169 /tools/lib/python | |
| parent | df2908090cda368b01ff43709f51890076c56157 (diff) | |
| download | linux-next-70fec428c845216da98041b1ae9f16a8f54b3d68.tar.gz linux-next-70fec428c845216da98041b1ae9f16a8f54b3d68.zip | |
pstore: don't leave an ERR_PTR in the ramoops zone pointer
ramoops_init_prz() stores the result of persistent_ram_new() in *prz and
returns the error without clearing it when initialization fails.
ramoops_probe() then cleans up through ramoops_free_przs(), which hands
*prz to persistent_ram_free(); that treats the ERR_PTR as a valid zone
and dereferences it, crashing the kernel.
Clear *prz before returning so that cleanup sees a NULL zone.
Fixes: b5d38e9bf1b0c ("pstore/ram: Add console messages handling")
Assisted-by: LLM
Signed-off-by: Andrea Parri <parri.andrea@gmail.com>
Link: https://patch.msgid.link/20260921202317.70595-2-parri.andrea@gmail.com
Signed-off-by: Kees Cook <kees@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
