Message ID | 20231215110157.296923-3-wojciech.drewek@intel.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Fixes for link-down-on-close flag | expand |
> -----Original Message----- > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Wojciech Drewek > Sent: Friday, December 15, 2023 4:32 PM > To: intel-wired-lan@lists.osuosl.org > Cc: netdev@vger.kernel.org > Subject: [Intel-wired-lan] [PATCH iwl-net 2/2] ice: Shut down VSI with "link-down-on-close" enabled > > From: Ngai-Mint Kwan <ngai-mint.kwan@intel.com> > > 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: 8ac7132704f3 ("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> > --- > drivers/net/ethernet/intel/ice/ice_main.c | 2 ++ > 1 file changed, 2 insertions(+) > Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 67c2ed2e61f9..a56fbc39e7fd 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c @@ -9301,6 +9301,8 @@ int ice_stop(struct net_device *netdev) else netdev_err(vsi->netdev, "Failed to set physical link down, VSI %d error %d\n", vsi->vsi_num, link_err); + + ice_vsi_close(vsi); return -EIO; } }