* [PATCH net] net: ethernet: ti: am65-cpsw: Fix forever loop in cleanup code
@ 2024-09-26 9:50 Dan Carpenter
2024-09-26 10:23 ` Sverdlin, Alexander
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Dan Carpenter @ 2024-09-26 9:50 UTC (permalink / raw)
To: Roger Quadros
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Julien Panis, Chintan Vankar, Alexander Sverdlin,
Grygorii Strashko, Simon Horman, netdev, linux-kernel,
kernel-janitors
This error handling has a typo. It should i++ instead of i--. In the
original code the error handling will loop until it crashes.
Fixes: da70d184a8c3 ("net: ethernet: ti: am65-cpsw: Introduce multi queue Rx")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index cbe99017cbfa..d253727b160f 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -763,7 +763,7 @@ static int am65_cpsw_nuss_common_open(struct am65_cpsw_common *common)
k3_udma_glue_disable_rx_chn(rx_chn->rx_chn);
fail_rx:
- for (i = 0; i < common->rx_ch_num_flows; i--)
+ for (i = 0; i < common->rx_ch_num_flows; i++)
k3_udma_glue_reset_rx_chn(rx_chn->rx_chn, i, &rx_chn->flows[i],
am65_cpsw_nuss_rx_cleanup, 0);
--
2.45.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: ethernet: ti: am65-cpsw: Fix forever loop in cleanup code
2024-09-26 9:50 [PATCH net] net: ethernet: ti: am65-cpsw: Fix forever loop in cleanup code Dan Carpenter
@ 2024-09-26 10:23 ` Sverdlin, Alexander
2024-09-26 12:25 ` Roger Quadros
2024-09-26 15:51 ` Simon Horman
2 siblings, 0 replies; 5+ messages in thread
From: Sverdlin, Alexander @ 2024-09-26 10:23 UTC (permalink / raw)
To: rogerq@kernel.org, dan.carpenter@linaro.org
Cc: c-vankar@ti.com, kernel-janitors@vger.kernel.org,
davem@davemloft.net, jpanis@baylibre.com,
grygorii.strashko@ti.com, linux-kernel@vger.kernel.org,
kuba@kernel.org, horms@kernel.org, edumazet@google.com,
pabeni@redhat.com, netdev@vger.kernel.org
Hi Dan!
On Thu, 2024-09-26 at 12:50 +0300, Dan Carpenter wrote:
> This error handling has a typo. It should i++ instead of i--. In the
> original code the error handling will loop until it crashes.
>
> Fixes: da70d184a8c3 ("net: ethernet: ti: am65-cpsw: Introduce multi queue Rx")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Thanks for fixing this!
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
> ---
> drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> index cbe99017cbfa..d253727b160f 100644
> --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
> @@ -763,7 +763,7 @@ static int am65_cpsw_nuss_common_open(struct am65_cpsw_common *common)
> k3_udma_glue_disable_rx_chn(rx_chn->rx_chn);
>
> fail_rx:
> - for (i = 0; i < common->rx_ch_num_flows; i--)
> + for (i = 0; i < common->rx_ch_num_flows; i++)
> k3_udma_glue_reset_rx_chn(rx_chn->rx_chn, i, &rx_chn->flows[i],
> am65_cpsw_nuss_rx_cleanup, 0);
>
--
Alexander Sverdlin
Siemens AG
www.siemens.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: ethernet: ti: am65-cpsw: Fix forever loop in cleanup code
2024-09-26 9:50 [PATCH net] net: ethernet: ti: am65-cpsw: Fix forever loop in cleanup code Dan Carpenter
2024-09-26 10:23 ` Sverdlin, Alexander
@ 2024-09-26 12:25 ` Roger Quadros
2024-09-26 15:51 ` Simon Horman
2 siblings, 0 replies; 5+ messages in thread
From: Roger Quadros @ 2024-09-26 12:25 UTC (permalink / raw)
To: Dan Carpenter
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Julien Panis, Chintan Vankar, Alexander Sverdlin,
Grygorii Strashko, Simon Horman, netdev, linux-kernel,
kernel-janitors
On 26/09/2024 12:50, Dan Carpenter wrote:
> This error handling has a typo. It should i++ instead of i--. In the
> original code the error handling will loop until it crashes.
>
> Fixes: da70d184a8c3 ("net: ethernet: ti: am65-cpsw: Introduce multi queue Rx")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: ethernet: ti: am65-cpsw: Fix forever loop in cleanup code
2024-09-26 9:50 [PATCH net] net: ethernet: ti: am65-cpsw: Fix forever loop in cleanup code Dan Carpenter
2024-09-26 10:23 ` Sverdlin, Alexander
2024-09-26 12:25 ` Roger Quadros
@ 2024-09-26 15:51 ` Simon Horman
2024-09-26 20:14 ` Dan Carpenter
2 siblings, 1 reply; 5+ messages in thread
From: Simon Horman @ 2024-09-26 15:51 UTC (permalink / raw)
To: Dan Carpenter
Cc: Roger Quadros, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Julien Panis, Chintan Vankar, Alexander Sverdlin,
Grygorii Strashko, netdev, linux-kernel, kernel-janitors
On Thu, Sep 26, 2024 at 12:50:45PM +0300, Dan Carpenter wrote:
> This error handling has a typo. It should i++ instead of i--. In the
> original code the error handling will loop until it crashes.
>
> Fixes: da70d184a8c3 ("net: ethernet: ti: am65-cpsw: Introduce multi queue Rx")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Hi Dan,
Unfortunately this patch didn't apply cleanly to net
which throws our CI off. So, unfortunately, I think it needs to
be rebased and reposted (after the 24h grace period).
--
pw-bot: changes-requested
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] net: ethernet: ti: am65-cpsw: Fix forever loop in cleanup code
2024-09-26 15:51 ` Simon Horman
@ 2024-09-26 20:14 ` Dan Carpenter
0 siblings, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2024-09-26 20:14 UTC (permalink / raw)
To: Simon Horman
Cc: Roger Quadros, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Julien Panis, Chintan Vankar, Alexander Sverdlin,
Grygorii Strashko, netdev, linux-kernel, kernel-janitors
On Thu, Sep 26, 2024 at 04:51:39PM +0100, Simon Horman wrote:
> On Thu, Sep 26, 2024 at 12:50:45PM +0300, Dan Carpenter wrote:
> > This error handling has a typo. It should i++ instead of i--. In the
> > original code the error handling will loop until it crashes.
> >
> > Fixes: da70d184a8c3 ("net: ethernet: ti: am65-cpsw: Introduce multi queue Rx")
> > Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
>
> Hi Dan,
>
> Unfortunately this patch didn't apply cleanly to net
> which throws our CI off. So, unfortunately, I think it needs to
> be rebased and reposted (after the 24h grace period).
It's not a matter of rebasing... I guess I accidentally deleted a space
character at the start of the first line of the diff? Weird.
Anyway, I'll resend.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-09-26 20:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-26 9:50 [PATCH net] net: ethernet: ti: am65-cpsw: Fix forever loop in cleanup code Dan Carpenter
2024-09-26 10:23 ` Sverdlin, Alexander
2024-09-26 12:25 ` Roger Quadros
2024-09-26 15:51 ` Simon Horman
2024-09-26 20:14 ` Dan Carpenter
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).