Re: [PATCH] pstore/ram: fix resource leak when ioremap() fails
From: Kees Cook
Date: Wed Feb 25 2026 - 22:02:41 EST
On Wed, 25 Feb 2026 16:54:06 -0700, Cole Leavitt wrote:
> In persistent_ram_iomap(), ioremap() or ioremap_wc() may return NULL on
> failure. Currently, if this happens, the function returns NULL without
> releasing the memory region acquired by request_mem_region().
>
> This leads to a resource leak where the memory region remains reserved
> but unusable.
>
> [...]
Thanks! I tweaked the patch a bit and applied to for-next/pstore, thanks!
[1/1] pstore/ram: fix resource leak when ioremap() fails
https://git.kernel.org/kees/c/bb5278a89dad
Take care,
--
Kees Cook