From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF2538489 for ; Fri, 10 Mar 2023 14:19:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 325C5C433D2; Fri, 10 Mar 2023 14:19:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678457954; bh=rRBvHy/KHR2tD3gr3x6cTLVEk8ik7A0RhuZoaqDQ//s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CXdJeg9Av3YfNSmkIyv0rLCDLf/UUE4qO9/J3C1woiDEsKTFHap4ANOcZOV36IpX7 gLvNIqqXt2Jzs7Hi6uEyXl+QAvL/Q6y2nM9gim7GhK59Esdk2rLQNpAEPBAa6Mz3rP LqIg4YmNc31ehe4wTs7uU1GbPXveEwYTs8cDsYAo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Bjorn Andersson , Chris Lew , Bjorn Andersson , Sasha Levin Subject: [PATCH 4.19 114/252] rpmsg: glink: Avoid infinite loop on intent for missing channel Date: Fri, 10 Mar 2023 14:38:04 +0100 Message-Id: <20230310133722.244345655@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310133718.803482157@linuxfoundation.org> References: <20230310133718.803482157@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Bjorn Andersson [ Upstream commit 3e74ec2f39362bffbd42854acbb67c7f4cb808f9 ] In the event that an intent advertisement arrives on an unknown channel the fifo is not advanced, resulting in the same message being handled over and over. Fixes: dacbb35e930f ("rpmsg: glink: Receive and store the remote intent buffers") Signed-off-by: Bjorn Andersson Reviewed-by: Chris Lew Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20230214234231.2069751-1-quic_bjorande@quicinc.com Signed-off-by: Sasha Levin --- drivers/rpmsg/qcom_glink_native.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index c10230ad90b29..940f099c2092f 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -929,6 +929,7 @@ static void qcom_glink_handle_intent(struct qcom_glink *glink, spin_unlock_irqrestore(&glink->idr_lock, flags); if (!channel) { dev_err(glink->dev, "intents for non-existing channel\n"); + qcom_glink_rx_advance(glink, ALIGN(msglen, 8)); return; } -- 2.39.2