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: 1876544 X-Patchwork-Delegate: anthony.l.nguyen@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=fpxup7PU; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Ss5v45Pstz20LT for ; Fri, 15 Dec 2023 22:04:00 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 76DAA81EDE; Fri, 15 Dec 2023 11:03:57 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 76DAA81EDE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1702638237; bh=spWhZ8IF+NWvD1Fr7HyMyemB15UAXdC7ocS4VRlNSBk=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=fpxup7PUHHAcJdpauJoI5csAjX8tlUrTQIphHKlPoxLyVbwBUslLSjDRbuM6AQhlU B0mJHSXz1VYb8CQ7smaBGUnc/9QbvqsQDGvTledr5Yf5JHZGAohpoJBReRla9iPXiK 080cjaYrTbWK5NDcsZ991WpmiEHR+TkJMKyeKJkMTFkxgSbvcvxpaI2GKjfkml8Yyi NOeOBnZG60c2CCklQa+iTnFK3lXjoweDJ4YDL2h+UD46H3ZPi1LKCs02s2MVC+WWM8 IE2Utd7S8WO49JCMDlip3WSZ7wQT5Jky6RVK67vEJumbssEsNoBsLHyU5+WHZJhDOt RU1dLw639e81w== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VUBaPAkpol-E; Fri, 15 Dec 2023 11:03:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id 79A6383947; Fri, 15 Dec 2023 11:03:56 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 79A6383947 X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 404AD1BF83B for ; Fri, 15 Dec 2023 11:03:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 73A9583D8B for ; Fri, 15 Dec 2023 11:03:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 73A9583D8B X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r4yitLfxbk19 for ; Fri, 15 Dec 2023 11:03:44 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by smtp1.osuosl.org (Postfix) with ESMTPS id 92AF283947 for ; Fri, 15 Dec 2023 11:03:44 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 92AF283947 X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="385679110" X-IronPort-AV: E=Sophos;i="6.04,278,1695711600"; d="scan'208";a="385679110" 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 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> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702638224; x=1734174224; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=r91IwQB98GjbzYQuxtqMyFt4lszlbhRTuZ/jgO7vu+s=; b=VVxdEsjewNaqZDi5cESYnPwFHnXOfjBUezXOpZxwMDa9uBYZkTtOtjBy 2XGPDURZR50D/SRnfcaA/wjmhQ1t/prHhGFw7W3QjQkpwbTPEcAjz6FCH Nb+0eof+WHHlJZAshkqKAgkiaemAz14rborNlEPz9wgwhd/vcpHnpRHvZ zrV7INLNqwp9brscRd4ThgBi526knolJDG4qxzAsY+j5S76i4uedYX7/a F0oDbItk4VVJJOQS4MLa4VP2vJnoUrd8YAHaMSFNKB+MNoOhTULcZJZSs 970miv2Gr2hd1V4x1lJCT1bD1PxYpnIE3PdO+KydVOo1p/+qNrkEvCQ+j Q==; X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=VVxdEsje Subject: [Intel-wired-lan] [PATCH iwl-net 2/2] ice: Shut down VSI with "link-down-on-close" enabled X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" 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; } }