[PATCH] mailbox: zynqmp: Put the parent node after reading buffer resources
T, Harini
harini.t at amd.com
Wed Nov 18 05:59:47 PST 2026
On 11/12/2026 12:46 PM, Zhu Jun wrote:
> versal_ipi_setup() obtains a reference to the parent node to look up
> the host message buffer resource, but never releases it. Each setup
> leaks the reference, including when a subsequent buffer mapping fails.
>
> The resource lookup copies the address and size into host_res. Drop
> the node reference immediately after that lookup.
>
> Fixes: 0ac39d85a741 ("mailbox: zynqmp: Enable Bufferless IPI usage on Versal-based SOC's")
> Signed-off-by: Zhu Jun <zhujun2 at cmss.chinamobile.com>
> ---
> drivers/mailbox/zynqmp-ipi-mailbox.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mailbox/zynqmp-ipi-mailbox.c b/drivers/mailbox/zynqmp-ipi-mailbox.c
> index 2b81bedf0653..0c175f0b048a 100644
> --- a/drivers/mailbox/zynqmp-ipi-mailbox.c
> +++ b/drivers/mailbox/zynqmp-ipi-mailbox.c
> @@ -696,6 +696,7 @@ static int versal_ipi_setup(struct zynqmp_ipi_mbox *ipi_mbox,
> mdev = &ipi_mbox->dev;
>
> host_idx = zynqmp_ipi_mbox_get_buf_res(parent_node, "msg", &host_res);
> + of_node_put(parent_node);
> remote_idx = zynqmp_ipi_mbox_get_buf_res(node, "msg", &remote_res);
>
> /*
Reviewed-by: Harini T <harini.t at amd.com>
Thanks,
Harini T
More information about the linux-arm-kernel
mailing list