ixgbe: fix crash with empty VF macvlan list
authorDan Carpenter <dan.carpenter@linaro.org>
Fri, 6 Oct 2023 12:53:09 +0000 (15:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Oct 2023 21:08:53 +0000 (23:08 +0200)
commit04753d5ae2098ebaa14e45ab0af53999dc52340f
tree9814a1a20112e4fdf151649c2027838df7f34b9c
parent89be6ad344f7632554aa444e1798a763281ea5e6
ixgbe: fix crash with empty VF macvlan list

[ Upstream commit 7b5add9af567c44e12196107f0fe106e194034fd ]

The adapter->vf_mvs.l list needs to be initialized even if the list is
empty.  Otherwise it will lead to crashes.

Fixes: a1cbb15c1397 ("ixgbe: Add macvlan support for VF")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Link: https://lore.kernel.org/r/ZSADNdIw8zFx1xw2@kadam
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c