Skip to content

Commit

Permalink
rpmsg: glink: Remove channel decouple from rpdev release
Browse files Browse the repository at this point in the history
If a channel is being rapidly restarting and the kobj release worker is
busy, there is a chance 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>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/1596086296-28529-6-git-send-email-deesin@codeaurora.org
  • Loading branch information
Chris Lew authored and Bjorn Andersson committed Oct 15, 2021
1 parent c7c182d commit 343ba27
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/rpmsg/qcom_glink_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -1417,9 +1417,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);
}

Expand Down

0 comments on commit 343ba27

Please sign in to comment.