mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mailbox: zynqmp: Put the parent node after reading buffer resources
@ 2026-11-12  7:16 Zhu Jun
  2026-11-18 13:59 ` T, Harini
  0 siblings, 1 reply; 2+ messages in thread
From: Zhu Jun @ 2026-11-12  7:16 UTC (permalink / raw)
  To: jassisinghbrar; +Cc: michal.simek, linux-kernel, linux-arm-kernel, Zhu Jun

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@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);
 
 	/*
-- 
2.51.0




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-18 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12  7:16 [PATCH] mailbox: zynqmp: Put the parent node after reading buffer resources Zhu Jun
2026-11-18 13:59 ` T, Harini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®