[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y/T0NRtorZn74EH3@corigine.com>
Date: Tue, 21 Feb 2023 17:41:25 +0100
From: Simon Horman <simon.horman@...igine.com>
To: Jochen Henneberg <jh@...neberg-systemdesign.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
netdev@...r.kernel.org, linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net: stmmac: Premature loop termination check was
ignored
On Tue, Feb 21, 2023 at 02:38:27PM +0100, Jochen Henneberg wrote:
>
> The premature loop termination check makes sense only in case of the
> jump to read_again where the count may have been updated. But
> read_again did not include the check.
I think a fixes tag appropriate here.
> Signed-off-by: Jochen Henneberg <jh@...neberg-systemdesign.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Code change makes sense to me.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 1a5b8dab5e9b..de98c009866a 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -5031,10 +5031,10 @@ static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue)
> len = 0;
> }
>
> +read_again:
> if (count >= limit)
> break;
>
> -read_again:
> buf1_len = 0;
> entry = next_entry;
> buf = &rx_q->buf_pool[entry];
> @@ -5221,10 +5221,10 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
> len = 0;
> }
>
> +read_again:
> if (count >= limit)
> break;
>
> -read_again:
> buf1_len = 0;
> buf2_len = 0;
> entry = next_entry;
> --
> 2.39.2
>
Powered by blists - more mailing lists