mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Avi Weiss <thnkslprpt@gmail.com>
To: Bjorn Andersson <andersson@kernel.org>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>,
	linux-remoteproc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, Avi Weiss <thnkslprpt@gmail.com>
Subject: [PATCH] rpmsg: glink: release channel OF node reference
Date: Mon, 12 Oct 2026 10:50:26 +0300	[thread overview]
Message-ID: <20261012075026.3265557-1-thnkslprpt@gmail.com> (raw)

qcom_glink_match_channel() returns a referenced child node, which
qcom_glink_rx_open() stores in rpdev->dev.of_node.

The release callback frees the rpmsg device but never drops the node
reference, so it leaks when the channel device goes away.

Drop the reference in qcom_glink_rpdev_release() before freeing the
device.

Fixes: b4f8e52b89f69 ("rpmsg: Introduce Qualcomm RPM glink driver")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
 drivers/rpmsg/qcom_glink_native.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index 55793fc18293..5142730dabc4 100644
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -1623,6 +1623,7 @@ static void qcom_glink_rpdev_release(struct device *dev)
 {
 	struct rpmsg_device *rpdev = to_rpmsg_device(dev);
 
+	of_node_put(dev->of_node);
 	kfree(rpdev);
 }
 

base-commit: c39c2cdbde1f2ad9e2886167e55ad6b4c4907d7f
-- 
2.43.0


                 reply	other threads:[~2026-10-12  7:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261012075026.3265557-1-thnkslprpt@gmail.com \
    --to=thnkslprpt@gmail.com \
    --cc=andersson@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®