Skip to content

Commit 18c800b

Browse files
bmikailenkogregkh
authored andcommitted
ice: Fix VSI rebuild WARN_ON check for VF
commit 7fe05e1 upstream. In commit b03d519 ("ice: store VF pointer instead of VF ID") WARN_ON checks were added to validate the vsi->vf pointer and catch programming errors. However, one check to vsi->vf was missed. This caused a call trace when resetting VFs. Fix ice_vsi_rebuild by encompassing VF pointer in WARN_ON check. Fixes: b03d519 ("ice: store VF pointer instead of VF ID") Signed-off-by: Benjamin Mikailenko <benjamin.mikailenko@intel.com> Tested-by: Marek Szlosek <marek.szlosek@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 79f86b8 commit 18c800b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/intel/ice/ice_lib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3178,7 +3178,7 @@ int ice_vsi_rebuild(struct ice_vsi *vsi, bool init_vsi)
31783178

31793179
pf = vsi->back;
31803180
vtype = vsi->type;
3181-
if (WARN_ON(vtype == ICE_VSI_VF) && !vsi->vf)
3181+
if (WARN_ON(vtype == ICE_VSI_VF && !vsi->vf))
31823182
return -EINVAL;
31833183

31843184
ice_vsi_init_vlan_ops(vsi);

0 commit comments

Comments
 (0)