Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3698119ybv; Mon, 10 Feb 2020 04:55:56 -0800 (PST) X-Google-Smtp-Source: APXvYqxBBBNi0WuIUVC+z3yDLM9ja69/uxjIOxwVc0w9xgslDMTqABp2Qsg0G4NoK+OW7j9Sjy90 X-Received: by 2002:a54:458d:: with SMTP id z13mr755631oib.32.1581339356562; Mon, 10 Feb 2020 04:55:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581339356; cv=none; d=google.com; s=arc-20160816; b=VNnqiBGSGJR+5e3k+5LPIZYd21qXPeNx1CQWYHWyVHVI4VnQQ6UzGIzEyJo8i2l6kT 3RQPfwEzZBQIbZgG5qoXe7LVV57ShtIFonEMwVp89uBclkvw0DjsrySJSTqX85n74Dcz YsqyXMs+Mc/BnwIOMhj+k0I/1KzQIFxDO9/aYdKkbyjL3oFDCX8y9ZacK3ym1aPpGOHF eQGfG222+8ISsZBRZtthLb7EmJ4+sbLKzDg/KsZ2BxWdkuZWiD0CaKwcg+PW1uI/CA/A 47XQrlAyP3DUqgcgpthJN8jJrimlVUE6I4iOL2xyajTkVWNTowvkSH8pwQGhjlB3t/re y7wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=t0a6h2XeuyQKSsomfmseYGVSj4NeCVWNHtDcOmlgg1U=; b=Nvht8GOVPryyGMNk5X5g3B+psviheze4bVu9muiU+9GhMrLuuoFUcuMeRxVbP5O/kQ O/ycADx4lC1HQoyxmXczbBjK2b4R1XLN9V8XzBhlf5Kes1+rhRNzw8x/FZTD3d8p/Oyd k4bXcdTMZqMCbE6k+uO5qZLqDf0qL4sNXfokMzUKAJRpMsGSmyyk7shYB42Z0oYx1uUO rU5vecWN/JN/kGUygZq4G6d97JCDkFjf55lXuyubxkIvQ4fm36fxrlZrlUzZyRUkyGtr H1N4C6vCRLHa/hrvfY4bR/HSVVnkrkahnRZ481oR/QWVQ1tvaS/ayf3mGp/928lQJ6dZ K7Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HwjSKjju; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z206si137485oia.142.2020.02.10.04.55.44; Mon, 10 Feb 2020 04:55:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HwjSKjju; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729759AbgBJMyo (ORCPT + 99 others); Mon, 10 Feb 2020 07:54:44 -0500 Received: from mail.kernel.org ([198.145.29.99]:45252 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730104AbgBJMl4 (ORCPT ); Mon, 10 Feb 2020 07:41:56 -0500 Received: from localhost (unknown [209.37.97.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DE96C2085B; Mon, 10 Feb 2020 12:41:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338516; bh=f5yk36EK64CQTFfSzSoUwsCNOY4a2Hv8MBIcE2VV3Bs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HwjSKjju1PINFH9duzhsHc7CPX5VD5fCYIvejKOeAwmubJgZ1Ixtz5xtjZtVAACET Wa2rKiKwuMeDQHjOjjjbzYUiHdHefhggy6ma0o0EiffBYeKzLeWCc5aZgVmTHOJNYy FAa874ab7r5eKw9jpPDCfliR1ShuaogSgsRZQCvE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dejin Zheng , Vinod Koul , "David S. Miller" Subject: [PATCH 5.5 324/367] net: stmmac: fix a possible endless loop Date: Mon, 10 Feb 2020 04:33:57 -0800 Message-Id: <20200210122452.888800113@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200210122423.695146547@linuxfoundation.org> References: <20200210122423.695146547@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dejin Zheng [ Upstream commit 7d10f0774f9e32aa2f2e012f7fcb312a2ce422b9 ] It forgot to reduce the value of the variable retry in a while loop in the ethqos_configure() function. It may cause an endless loop and without timeout. Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos") Signed-off-by: Dejin Zheng Acked-by: Vinod Koul Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -413,6 +413,7 @@ static int ethqos_configure(struct qcom_ dll_lock = rgmii_readl(ethqos, SDC4_STATUS); if (dll_lock & SDC4_STATUS_DLL_LOCK) break; + retry--; } while (retry > 0); if (!retry) dev_err(ðqos->pdev->dev,