ice: Shut down VSI with "link-down-on-close" enabled

[ Upstream commit 6d05ff55ef4f4954d28551236239f297bd52ea48 ]

Disabling netdev with ethtool private flag "link-down-on-close" enabled
can cause NULL pointer dereference bug. Shut down VSI regardless of
"link-down-on-close" state.

Fixes: 8ac7132704 ("ice: Fix interface being down after reset with link-down-on-close flag on")
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Ngai-Mint Kwan <ngai-mint.kwan@intel.com>
Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Ngai-Mint Kwan 2023-12-15 12:01:57 +01:00 committed by Greg Kroah-Hartman
parent 83b80170b7
commit 188c9970d0
1 changed files with 2 additions and 0 deletions

View File

@ -9071,6 +9071,8 @@ int ice_stop(struct net_device *netdev)
else else
netdev_err(vsi->netdev, "Failed to set physical link down, VSI %d error %d\n", netdev_err(vsi->netdev, "Failed to set physical link down, VSI %d error %d\n",
vsi->vsi_num, link_err); vsi->vsi_num, link_err);
ice_vsi_close(vsi);
return -EIO; return -EIO;
} }
} }