[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <95370ca0-c60a-ad91-aa22-60a1d9376461@intel.com>
Date: Mon, 9 Oct 2023 08:17:48 -0700
From: Jesse Brandeburg <jesse.brandeburg@...el.com>
To: Dan Carpenter <dan.carpenter@...aro.org>, Jinjie Ruan
<ruanjinjie@...wei.com>
CC: Tony Nguyen <anthony.l.nguyen@...el.com>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski
<kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Jacob Keller
<jacob.e.keller@...el.com>, Simon Horman <horms@...nel.org>,
<intel-wired-lan@...ts.osuosl.org>, <netdev@...r.kernel.org>,
<kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH net-next 1/2] igb: Fix an end of loop test
On 10/5/2023 6:57 AM, Dan Carpenter wrote:
> When we exit a list_for_each_entry() without hitting a break statement,
> the list iterator isn't NULL, it just point to an offset off the
> list_head. In that situation, it wouldn't be too surprising for
> entry->free to be true and we end up corrupting memory.
>
> The way to test for these is to just set a flag.
>
> Fixes: c1fec890458a ("ethernet/intel: Use list_for_each_entry() helper")
> Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@...el.com>
Powered by blists - more mailing lists