[PATCH] irqchip/riscv-rpmi-sysmsi: Fix mailbox channel leak in rpmi_sysmsi_probe()
Markus Elfring
Markus.Elfring at web.de
Mon Mar 16 01:15:42 PDT 2026
> When riscv_acpi_get_gsi_info() fails, the mailbox channel previously
> requested via mbox_request_channel() is not freed. Add the missing
> mbox_free_channel() call to prevent the resource leak.
How do you think about to increase the application of scope-based resource management?
https://elixir.bootlin.com/linux/v7.0-rc3/source/drivers/mailbox/mailbox.c#L465-L496
https://elixir.bootlin.com/linux/v7.0-rc3/source/drivers/irqchip/irq-riscv-rpmi-sysmsi.c#L210-L307
Were any source code analysis tools involved here?
See also once more:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/stable-kernel-rules.rst?h=v7.0-rc3#n34
Regards,
Markus
More information about the linux-riscv
mailing list