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 3386BBA4F for ; Tue, 7 Mar 2023 19:04:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5BACC433D2; Tue, 7 Mar 2023 19:04:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678215860; bh=5+l4xdEl/zDsLdC2FfiWozfsf9EPMihovWeAIU0DguU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2uEJNqBStB5i1H3y0PlAHYvB5oGzOBRtPS0s7R3e3hFdVHaOMN9h9820/mt2fyYOY jzVDjnmFyhnZ54e8cf63sGYqtQbjELsrjwxiaCVBLfvvv3ttlamcQXtNA5vwjPJEAs Y1EMj2zZd+1iIW6ZA0PlN+MOuRb7+iow5l0rIN1I= 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 5.15 364/567] rpmsg: glink: Avoid infinite loop on intent for missing channel Date: Tue, 7 Mar 2023 18:01:40 +0100 Message-Id: <20230307165921.635674612@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307165905.838066027@linuxfoundation.org> References: <20230307165905.838066027@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 13c31372337a2..fd4c2f0fa4b1f 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