diff mbox series

[V1,5/6] rpmsg: glink: Remove channel decouple from rpdev release

Message ID 1596086296-28529-6-git-send-email-deesin@codeaurora.org (mailing list archive)
State New, archived
Headers show
Series Glink native fixes upstreaming | expand

Commit Message

Deepak Kumar Singh July 30, 2020, 5:18 a.m. UTC
From: Chris Lew <clew@codeaurora.org>

If a channel is being rapidly restarting and the kobj release worker
is busy, there is a chance the the rpdev_release function will run
after the channel struct itself has been released.

There should not be a need to decouple the channel from rpdev in the
rpdev release since that should only happen from the close commands.

Signed-off-by: Chris Lew <clew@codeaurora.org>
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
---
 drivers/rpmsg/qcom_glink_native.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Bjorn Andersson Oct. 15, 2021, 5:22 p.m. UTC | #1
On Thu, 30 Jul 2020 10:48:15 +0530, Deepak Kumar Singh wrote:
> From: Chris Lew <clew@codeaurora.org>
> 
> If a channel is being rapidly restarting and the kobj release worker
> is busy, there is a chance the the rpdev_release function will run
> after the channel struct itself has been released.
> 
> There should not be a need to decouple the channel from rpdev in the
> rpdev release since that should only happen from the close commands.
> 
> [...]

Applied, thanks!

[5/6] rpmsg: glink: Remove channel decouple from rpdev release
      commit: 343ba27b6f9d473ec3e602cc648300eb03a7fa05

Best regards,
diff mbox series

Patch

diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index 031bc1d..efaf32d 100644
--- a/drivers/rpmsg/qcom_glink_native.c
+++ b/drivers/rpmsg/qcom_glink_native.c
@@ -1419,9 +1419,7 @@  static const struct rpmsg_endpoint_ops glink_endpoint_ops = {
 static void qcom_glink_rpdev_release(struct device *dev)
 {
 	struct rpmsg_device *rpdev = to_rpmsg_device(dev);
-	struct glink_channel *channel = to_glink_channel(rpdev->ept);
 
-	channel->rpdev = NULL;
 	kfree(rpdev);
 }