linux/drivers/net/ethernet/intel/ixgbe
Dan Carpenter a41654c3ed ixgbe: fix end of loop test in ixgbe_set_vf_macvlan()
The list iterator in a list_for_each_entry() loop can never be NULL.
If the loop exits without hitting a break then the iterator points
to an offset off the list head and dereferencing it is an out of
bounds access.

Before we transitioned to using list_for_each_entry() loops, then
it was possible for "entry" to be NULL and the comments mention
this.  I have updated the comments to match the new code.

Fixes: c1fec89045 ("ethernet/intel: Use list_for_each_entry() helper")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-10-20 12:53:06 +01:00
..
Makefile
ixgbe.h ixgbe: Remove unused function declarations 2023-08-08 14:56:01 -07:00
ixgbe_82598.c
ixgbe_82599.c
ixgbe_common.c
ixgbe_common.h ixgbe: Remove unused function declarations 2023-08-08 14:56:01 -07:00
ixgbe_dcb.c
ixgbe_dcb.h
ixgbe_dcb_82598.c
ixgbe_dcb_82598.h
ixgbe_dcb_82599.c
ixgbe_dcb_82599.h
ixgbe_dcb_nl.c
ixgbe_debugfs.c
ixgbe_ethtool.c intel: fix format warnings 2023-10-18 18:10:17 -07:00
ixgbe_fcoe.c
ixgbe_fcoe.h
ixgbe_ipsec.c
ixgbe_ipsec.h
ixgbe_lib.c ixgbe: Fix panic during XDP_TX with > 64 CPUs 2023-04-27 11:54:33 +02:00
ixgbe_main.c net: Tree wide: Replace xdp_do_flush_map() with xdp_do_flush(). 2023-10-03 07:34:51 -07:00
ixgbe_mbx.c
ixgbe_mbx.h
ixgbe_model.h
ixgbe_phy.c
ixgbe_phy.h
ixgbe_ptp.c ixgbe: fix timestamp configuration code 2023-09-13 12:23:46 +01:00
ixgbe_sriov.c ixgbe: fix end of loop test in ixgbe_set_vf_macvlan() 2023-10-20 12:53:06 +01:00
ixgbe_sriov.h
ixgbe_sysfs.c
ixgbe_txrx_common.h
ixgbe_type.h
ixgbe_x540.c
ixgbe_x540.h
ixgbe_x550.c
ixgbe_xsk.c net: Tree wide: Replace xdp_do_flush_map() with xdp_do_flush(). 2023-10-03 07:34:51 -07:00