[PATCH 0/2] pstore/ram: Fix error-pointer cleanup and region bounds check wrap

From: Raul E Rangel

Date: Wed Nov 18 2026 - 17:39:00 EST


This series fixes two buglets in fs/pstore/ram.c during ramoops probe:

1. Clear *prz when persistent_ram_new() returns an ERR_PTR in
ramoops_init_prz() so the fail_init teardown path does not pass an
error pointer to persistent_ram_free().
2. Check remaining region space ahead of the record_size division in
ramoops_init_przs(), and subtract from cxt->size instead of adding
to *paddr in both ramoops_init_przs() and ramoops_init_prz() so the
bounds check cannot wrap.


Raul E Rangel (2):
pstore/ram: Clear *prz on persistent_ram_new() failure
pstore/ram: Fix region bounds check wrap

fs/pstore/ram.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)

--
2.56.1.708.g77570a6a1d-goog