From 32933046afa7b97fc936434d242de4faadabf350 Mon Sep 17 00:00:00 2001 From: Deepak Kumar Singh Date: Tue, 27 Apr 2021 20:17:38 +0530 Subject: [PATCH] rpmsg: glink: mark intent request complete before wake up Channel release function is not making intent wait condition true before calling wake_up, due to this thread waiting on intent is stuck and does not wake up until timeout happens. By this time channel context is freed and this casues finish wait to fail due to access of wait queue in freed channel context. Mark intent request complete before calling wake_up. CRs-Fixed: 2914979 Change-Id: Ia4162c9e62f0f5a7bd04ca0e09c2cd58319ef341 Signed-off-by: Deepak Kumar Singh --- 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 2117a9dd0435..89bf975415e1 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -308,6 +308,8 @@ static void qcom_glink_channel_release(struct kref *ref) int iid; CH_INFO(channel, "\n"); + channel->intent_req_result = false; + atomic_inc(&channel->intent_req_comp); wake_up(&channel->intent_req_event); /* cancel pending rx_done work */