[PATCH] ARM: vexpress: fix iounmap missing after of_iomap in SMP prepare
Linus Walleij
linusw at kernel.org
Thu Nov 5 04:57:00 PST 2026
On Wed, Nov 4, 2026 at 3:54 PM Sudeep Holla <sudeep.holla at kernel.org> wrote:
> of_iomap() maps a region of device memory and returns a pointer that
> must later be released with iounmap(). Currently return value from
> of_iomap() is passed directly to scu_enable() without saving it, making
> it impossible to unmap afterwards, causing an I/O memory leak.
>
> Store the mapped base address in a local variable, check it for NULL,
> call scu_enable(), then release the mapping with iounmap().
>
> Reported-by: Sashiko <sashiko-bot at kernel.org>
> Closes: https://sashiko.dev/#/bug/linux-5bb0baa3-6a9a-49a0-94f1-80f8cd8f6915
> Closes: https://sashiko.dev/#/bug/linux-6803acf3-f91e-450a-a738-8803e6ac1f1a
> Signed-off-by: Sudeep Holla <sudeep.holla at kernel.org>
Reviewed-by: Linus Walleij <linusw at kernel.org>
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list