[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240819093016.GB11472@kernel.org>
Date: Mon, 19 Aug 2024 10:30:16 +0100
From: Simon Horman <horms@...nel.org>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Ioana Ciornei <ioana.ciornei@....com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Vladimir Oltean <vladimir.oltean@....com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH net] dpaa2-switch: Fix error checking in
dpaa2_switch_seed_bp()
On Sat, Aug 17, 2024 at 09:52:46AM +0300, Dan Carpenter wrote:
> The dpaa2_switch_add_bufs() function returns the number of bufs that it
> was able to add. It returns BUFS_PER_CMD (7) for complete success or a
> smaller number if there are not enough pages available. However, the
> error checking is looking at the total number of bufs instead of the
> number which were added on this iteration. Thus the error checking
> only works correctly for the first iteration through the loop and
> subsequent iterations are always counted as a success.
>
> Fix this by checking only the bufs added in the current iteration.
>
> Fixes: 0b1b71370458 ("staging: dpaa2-switch: handle Rx path on control interface")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> ---
> >From reviewing the code. Not tested.
Reviewed-by: Simon Horman <horms@...nel.org>
Powered by blists - more mailing lists