* [PATCH] net: stmmac: fix a possible endless loop
@ 2020-02-06 13:21 Dejin Zheng
2020-02-06 13:32 ` David Miller
2020-02-06 13:35 ` Vinod Koul
0 siblings, 2 replies; 5+ messages in thread
From: Dejin Zheng @ 2020-02-06 13:21 UTC (permalink / raw)
To: vkoul, peppe.cavallaro, alexandre.torgue, joabreu, davem,
mcoquelin.stm32
Cc: netdev, Dejin Zheng, linux-stm32, linux-arm-kernel, linux-kernel
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.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index 7ec895407d23..e0a5fe83d8e0 100644
--- 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_ethqos *ethqos)
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,
--
2.25.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] net: stmmac: fix a possible endless loop
2020-02-06 13:21 [PATCH] net: stmmac: fix a possible endless loop Dejin Zheng
@ 2020-02-06 13:32 ` David Miller
2020-02-06 13:35 ` Vinod Koul
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2020-02-06 13:32 UTC (permalink / raw)
To: zhengdejin5
Cc: alexandre.torgue, netdev, linux-kernel, vkoul, joabreu,
mcoquelin.stm32, peppe.cavallaro, linux-stm32, linux-arm-kernel
From: Dejin Zheng <zhengdejin5@gmail.com>
Date: Thu, 6 Feb 2020 21:21:47 +0800
> 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.
>
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
Please resubmit this with an appropriate Fixes: tag.
Thank you.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: stmmac: fix a possible endless loop
2020-02-06 13:21 [PATCH] net: stmmac: fix a possible endless loop Dejin Zheng
2020-02-06 13:32 ` David Miller
@ 2020-02-06 13:35 ` Vinod Koul
2020-02-06 13:37 ` David Miller
1 sibling, 1 reply; 5+ messages in thread
From: Vinod Koul @ 2020-02-06 13:35 UTC (permalink / raw)
To: Dejin Zheng
Cc: alexandre.torgue, netdev, linux-kernel, linux-stm32, joabreu,
mcoquelin.stm32, peppe.cavallaro, davem, linux-arm-kernel
On 06-02-20, 21:21, Dejin Zheng wrote:
> 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.
Thanks for the fix.
Acked-by: Vinod Koul <vkoul@kernel.org>
We should add:
Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos")
Also, I think this should be CCed stable
--
~Vinod
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: stmmac: fix a possible endless loop
2020-02-06 13:35 ` Vinod Koul
@ 2020-02-06 13:37 ` David Miller
2020-02-06 13:45 ` Vinod Koul
0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2020-02-06 13:37 UTC (permalink / raw)
To: vkoul
Cc: alexandre.torgue, zhengdejin5, linux-kernel, joabreu,
mcoquelin.stm32, netdev, peppe.cavallaro, linux-stm32,
linux-arm-kernel
From: Vinod Koul <vkoul@kernel.org>
Date: Thu, 6 Feb 2020 19:05:54 +0530
> On 06-02-20, 21:21, Dejin Zheng wrote:
>> 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.
>
> Thanks for the fix.
>
> Acked-by: Vinod Koul <vkoul@kernel.org>
>
> We should add:
> Fixes: a7c30e62d4b8 ("net: stmmac: Add driver for Qualcomm ethqos")
>
> Also, I think this should be CCed stable
Networking patches do not CC: stable, I queued them up myself manually.
Please read the netdev FAQ under Documentation/ for details.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] net: stmmac: fix a possible endless loop
2020-02-06 13:37 ` David Miller
@ 2020-02-06 13:45 ` Vinod Koul
0 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2020-02-06 13:45 UTC (permalink / raw)
To: David Miller
Cc: alexandre.torgue, zhengdejin5, linux-kernel, joabreu,
mcoquelin.stm32, netdev, peppe.cavallaro, linux-stm32,
linux-arm-kernel
On 06-02-20, 14:37, David Miller wrote:
> >
> > Also, I think this should be CCed stable
>
> Networking patches do not CC: stable, I queued them up myself manually.
>
> Please read the netdev FAQ under Documentation/ for details.
Oops sorry I forgot about that part.
Thanks
--
~Vinod
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-02-06 13:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 13:21 [PATCH] net: stmmac: fix a possible endless loop Dejin Zheng
2020-02-06 13:32 ` David Miller
2020-02-06 13:35 ` Vinod Koul
2020-02-06 13:37 ` David Miller
2020-02-06 13:45 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).