[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241031191633.79827a62@kernel.org>
Date: Thu, 31 Oct 2024 19:16:33 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Sergey Ryazanov <ryazanov.s.a@...il.com>
Cc: Jinjie Ruan <ruanjinjie@...wei.com>, chandrashekar.devegowda@...el.com,
chiranjeevi.rapolu@...ux.intel.com, haijun.liu@...iatek.com,
m.chetan.kumar@...ux.intel.com, ricardo.martinez@...ux.intel.com,
loic.poulain@...aro.org, johannes@...solutions.net, andrew+netdev@...n.ch,
davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v2] net: wwan: t7xx: Fix off-by-one error in
t7xx_dpmaif_rx_buf_alloc()
On Wed, 30 Oct 2024 18:01:07 +0200 Sergey Ryazanov wrote:
> On October 29, 2024 2:56:00 PM, Jinjie Ruan <ruanjinjie@...wei.com> wrote:
> >The error path in t7xx_dpmaif_rx_buf_alloc(), free and unmap the already
> >allocated and mapped skb in a loop, but the loop condition terminates when
> >the index reaches zero, which fails to free the first allocated skb at
> >index zero.
> >
> >Check for >= 0 so that skb at index 0 is freed as well.
> >
> >Fixes: d642b012df70 ("net: wwan: t7xx: Add data path interface")
> >Suggested-by: Sergey Ryazanov <ryazanov.s.a@...il.com>
> >Signed-off-by: Jinjie Ruan <ruanjinjie@...wei.com>
>
> Jakub, when applying, could you drop that suggested-by tag, please.
> My contribution was only a small suggestion to avoid an endless loop.
> In all other meanings this patch is original work made by Jinjie, and
> all creds should go to him.
TBH I find the while (i--) solution suggested by Ilpo more idiomatic,
too, let's do a v3 with that and without unnecessary Suggested-by tags.
Powered by blists - more mailing lists