* [PATCH] rpmsg: qcom_smd: release channel OF node on device destruction
@ 2026-10-13 5:56 Avi Weiss
2026-10-15 11:59 ` Konrad Dybcio
0 siblings, 1 reply; 2+ messages in thread
From: Avi Weiss @ 2026-10-13 5:56 UTC (permalink / raw)
To: Bjorn Andersson
Cc: Mathieu Poirier, linux-remoteproc, linux-arm-msm, linux-kernel,
Avi Weiss
qcom_smd_match_channel() returns a referenced OF child node,
which is stored in rpdev->dev.of_node. qcom_smd_release_device()
frees the device without dropping that reference, leaking it
when the channel device is released.
Release the OF node reference in the device release callback.
Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
drivers/rpmsg/qcom_smd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c
index 7dbe1c6efe41..6c1cb66528e7 100644
--- a/drivers/rpmsg/qcom_smd.c
+++ b/drivers/rpmsg/qcom_smd.c
@@ -1065,6 +1065,7 @@ static void qcom_smd_release_device(struct device *dev)
struct rpmsg_device *rpdev = to_rpmsg_device(dev);
struct qcom_smd_device *qsdev = to_smd_device(rpdev);
+ of_node_put(dev->of_node);
kfree(qsdev);
}
base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] rpmsg: qcom_smd: release channel OF node on device destruction
2026-10-13 5:56 [PATCH] rpmsg: qcom_smd: release channel OF node on device destruction Avi Weiss
@ 2026-10-15 11:59 ` Konrad Dybcio
0 siblings, 0 replies; 2+ messages in thread
From: Konrad Dybcio @ 2026-10-15 11:59 UTC (permalink / raw)
To: Avi Weiss, Bjorn Andersson
Cc: Mathieu Poirier, linux-remoteproc, linux-arm-msm, linux-kernel
On 10/13/26 7:56 AM, Avi Weiss wrote:
> qcom_smd_match_channel() returns a referenced OF child node,
> which is stored in rpdev->dev.of_node. qcom_smd_release_device()
> frees the device without dropping that reference, leaking it
> when the channel device is released.
>
> Release the OF node reference in the device release callback.
>
> Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend")
> Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
> ---
Acked-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-15 11:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-13 5:56 [PATCH] rpmsg: qcom_smd: release channel OF node on device destruction Avi Weiss
2026-10-15 11:59 ` Konrad Dybcio
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®