From a35460ef6de7595c5b282834dbd72e44a12e8ee0 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index f6c4e25bbf7b..e53ffa61f7a5 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -253,6 +253,9 @@ static void qcom_glink_channel_release(struct kref *ref) unsigned long flags; int iid; + channel->intent_req_result = false; + complete_all(&channel->intent_req_comp); + /* cancel pending rx_done work */ cancel_work_sync(&channel->intent_work);