On Thu, Oct 05, 2023 at 04:57:21PM +0300, 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@xxxxxxxxxx> Reviewed-by: Simon Horman <horms@xxxxxxxxxx>