From patchwork Fri Dec 15 11:01:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wojciech Drewek X-Patchwork-Id: 13494286 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7541A1C2B3 for ; Fri, 15 Dec 2023 11:03:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="l1O6AUUs" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702638225; x=1734174225; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=r91IwQB98GjbzYQuxtqMyFt4lszlbhRTuZ/jgO7vu+s=; b=l1O6AUUsWgQGB76O+i2jgumj6LjO5HYurHD/ezL1aFHtxAF8ym1CDqX/ Bl2ZDeEavU7PkNeqvOL/U6xamRpu52yp4N8j8HNnIoCYERfunQ6mTKJtp bwP1uFiyL0v1YOZWVOYg1y786xy21OIlAZMivW5XZ5Fr9cO8gT8r3WP1m vUs/1t66GBPPsCPkyudHdg3ga6gWAQIsZfQz5EJOg3XbdE+yr9dG6LB3z jya0Ps4ANbzkyKUyvjTswrkrOo2wAfGIPYOJu7N7q6WPeZUShxGmmgOdy uY5vYd70//TQ2hjIIn6hwBrmbHL38LXKFkjyrlHq68wqQAQ3EfX3YCurI w==; X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="385679109" X-IronPort-AV: E=Sophos;i="6.04,278,1695711600"; d="scan'208";a="385679109" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2023 03:03:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="918408309" X-IronPort-AV: E=Sophos;i="6.04,278,1695711600"; d="scan'208";a="918408309" Received: from irvmail002.ir.intel.com ([10.43.11.120]) by fmsmga001.fm.intel.com with ESMTP; 15 Dec 2023 03:03:42 -0800 Received: from rozewie.igk.intel.com (unknown [10.211.8.69]) by irvmail002.ir.intel.com (Postfix) with ESMTP id DF2A039C86; Fri, 15 Dec 2023 11:03:41 +0000 (GMT) From: Wojciech Drewek To: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org Subject: [PATCH iwl-net 2/2] ice: Shut down VSI with "link-down-on-close" enabled Date: Fri, 15 Dec 2023 12:01:57 +0100 Message-Id: <20231215110157.296923-3-wojciech.drewek@intel.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231215110157.296923-1-wojciech.drewek@intel.com> References: <20231215110157.296923-1-wojciech.drewek@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Ngai-Mint Kwan 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 Signed-off-by: Ngai-Mint Kwan Signed-off-by: Wojciech Drewek Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) --- drivers/net/ethernet/intel/ice/ice_main.c | 2 ++ 1 file changed, 2 insertions(+) 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; } }