All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH] rpmsg: glink: Release driver_override
@ 2023-01-09 22:39 Bjorn Andersson
  2023-02-15 19:21 ` Bjorn Andersson
  0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Andersson @ 2023-01-09 22:39 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier
  Cc: linux-arm-msm, linux-remoteproc, linux-kernel, Chris Lew

Upon termination of the rpmsg_device, driver_override needs to be freed
to avoid leaking the potentially assigned string.

Fixes: 42cd402b8fd4 ("rpmsg: Fix kfree() of static memory on setting driver_override")
Fixes: 39e47767ec9b ("rpmsg: Add driver_override device attribute for rpmsg_device")
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
---

Resending this without the get_maintainer notes in the recipients list.

 drivers/rpmsg/qcom_glink_native.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index 8620eea1dc8a..046271e439c5 100644
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -1454,6 +1454,7 @@ static void qcom_glink_rpdev_release(struct device *dev)
 {
 	struct rpmsg_device *rpdev = to_rpmsg_device(dev);
 
+	kfree(rpdev->driver_override);
 	kfree(rpdev);
 }
 
@@ -1697,6 +1698,7 @@ static void qcom_glink_device_release(struct device *dev)
 
 	/* Release qcom_glink_alloc_channel() reference */
 	kref_put(&channel->refcount, qcom_glink_channel_release);
+	kfree(rpdev->driver_override);
 	kfree(rpdev);
 }
 
-- 
2.37.3


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

* Re: [RESEND PATCH] rpmsg: glink: Release driver_override
  2023-01-09 22:39 [RESEND PATCH] rpmsg: glink: Release driver_override Bjorn Andersson
@ 2023-02-15 19:21 ` Bjorn Andersson
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Andersson @ 2023-02-15 19:21 UTC (permalink / raw)
  To: Bjorn Andersson, Mathieu Poirier
  Cc: Chris Lew, linux-remoteproc, linux-arm-msm, linux-kernel

On Mon, 9 Jan 2023 14:39:31 -0800, Bjorn Andersson wrote:
> Upon termination of the rpmsg_device, driver_override needs to be freed
> to avoid leaking the potentially assigned string.
> 
> 

Applied, thanks!

[1/1] rpmsg: glink: Release driver_override
      commit: fb80ef67e8ff6a00d3faad4cb348dafdb8eccfd8

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2023-02-15 19:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09 22:39 [RESEND PATCH] rpmsg: glink: Release driver_override Bjorn Andersson
2023-02-15 19:21 ` Bjorn Andersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.