Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2216804/?format=api
{ "id": 2216804, "url": "http://patchwork.ozlabs.org/api/patches/2216804/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260327072332.130320-8-aleksandr.loktionov@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260327072332.130320-8-aleksandr.loktionov@intel.com>", "list_archive_url": null, "date": "2026-03-27T07:23:31", "name": "[net] ice: stop DCBNL requests during driver unload", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "4eaf19765ca20c11bfb1a8c9698692b2ead5e7fa", "submitter": { "id": 75597, "url": "http://patchwork.ozlabs.org/api/people/75597/?format=api", "name": "Loktionov, Aleksandr", "email": "aleksandr.loktionov@intel.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260327072332.130320-8-aleksandr.loktionov@intel.com/mbox/", "series": [ { "id": 497713, "url": "http://patchwork.ozlabs.org/api/series/497713/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=497713", "date": "2026-03-27T07:23:31", "name": "[net] ice: stop DCBNL requests during driver unload", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/497713/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2216804/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2216804/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=zl8aFnPs;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.136; helo=smtp3.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fhsZd1CCbz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 27 Mar 2026 18:23:53 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 451FF611DF;\n\tFri, 27 Mar 2026 07:23:51 +0000 (UTC)", "from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id vPocvGTiBXa9; Fri, 27 Mar 2026 07:23:49 +0000 (UTC)", "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 6F76F6127C;\n\tFri, 27 Mar 2026 07:23:49 +0000 (UTC)", "from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n by lists1.osuosl.org (Postfix) with ESMTP id 265AD2D5\n for <intel-wired-lan@lists.osuosl.org>; Fri, 27 Mar 2026 07:23:48 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id 18DAD415FA\n for <intel-wired-lan@lists.osuosl.org>; Fri, 27 Mar 2026 07:23:48 +0000 (UTC)", "from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id lPldrhBn16We for <intel-wired-lan@lists.osuosl.org>;\n Fri, 27 Mar 2026 07:23:47 +0000 (UTC)", "from mgamail.intel.com (mgamail.intel.com [192.198.163.14])\n by smtp4.osuosl.org (Postfix) with ESMTPS id 19C7441574\n for <intel-wired-lan@lists.osuosl.org>; Fri, 27 Mar 2026 07:23:47 +0000 (UTC)", "from orviesa002.jf.intel.com ([10.64.159.142])\n by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 27 Mar 2026 00:23:46 -0700", "from amlin-019-225.igk.intel.com ([10.102.19.225])\n by orviesa002.jf.intel.com with ESMTP; 27 Mar 2026 00:23:45 -0700" ], "X-Virus-Scanned": [ "amavis at osuosl.org", "amavis at osuosl.org" ], "X-Comment": "SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ", "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6F76F6127C", "OpenDKIM Filter v2.11.0 smtp4.osuosl.org 19C7441574" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1774596229;\n\tbh=VEZ+UfXawIfpShGFo/Ka+57eKxUShqqY7bHMOG25NIQ=;\n\th=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From;\n\tb=zl8aFnPsilbScYCzhAhsRQJ4uQtusbHQYtgFisFjeFDcJuwaFCOrT8iaI6kNu3Lyi\n\t pAzAoXdW4BMznPQx1iwJYncA2LyDKkSm5GTlVgEwBMmkKfq7qZUGcQQJf5jOQw9Imc\n\t 3U55jg9ydcTBoDZ0dxT38A3ustxDEs8YMWmfF5f4kRUN+0MAZ12mYSvLqu+nWtrlno\n\t 3hHnEHSz3vtFqu/koGemVWoG6B4bMSFAct7kBTec7YINrSaqBZ+OCd5EQcBq/lQtPR\n\t CDTnQgHN3Uv9FQKrlY/hg1FIfzr8tXcsaBHbh3xjPVvdzCK4xVPDoxmB4aXWm0oZ5N\n\t 869pu75HNyCQg==", "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.14;\n helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com;\n receiver=<UNKNOWN>", "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp4.osuosl.org 19C7441574", "X-CSE-ConnectionGUID": [ "jNEy2zLTRD6Udh1SojGWkQ==", "v97pXds9RCm8WRrwnK8Jng==" ], "X-CSE-MsgGUID": [ "Urb7CO8pSeieiiu2sj+RMQ==", "b0mRNXA+TXm2iIcLWcp5Jg==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6800,10657,11741\"; a=\"75733983\"", "E=Sophos;i=\"6.23,143,1770624000\"; d=\"scan'208\";a=\"75733983\"", "E=Sophos;i=\"6.23,143,1770624000\"; d=\"scan'208\";a=\"255739116\"" ], "X-ExtLoop1": "1", "From": "Aleksandr Loktionov <aleksandr.loktionov@intel.com>", "To": "intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com,\n aleksandr.loktionov@intel.com", "Cc": "netdev@vger.kernel.org,\n\tDave Ertman <david.m.ertman@intel.com>", "Date": "Fri, 27 Mar 2026 08:23:31 +0100", "Message-ID": "<20260327072332.130320-8-aleksandr.loktionov@intel.com>", "X-Mailer": "git-send-email 2.52.0", "In-Reply-To": "<20260327072332.130320-1-aleksandr.loktionov@intel.com>", "References": "<20260327072332.130320-1-aleksandr.loktionov@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Mailman-Original-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1774596227; x=1806132227;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=wNHNslyd6MNc9Q8hzBtoAtv+43HUwDJhNoUcYjJZM1E=;\n b=EpQ+uD2YQJ9VwC0DTwk/revJhOGk2HaY/3z9kWgXJK4HEZ0J9BSWuV3p\n GrpVq5eRMFl11te4IHjFc/1XndJ2l54Gzz1C84WphvQt5VftyIJmJtA/E\n KDE4Eu8t7GjeZq77Y/xUNTfEaDpB6/27n5qNuiO2jrKvtBWtVlxqyjr0S\n IY77tSpoIeHnY+YF5JsbtjR55TcehwdODU/oZ6ZYXVVCHA2Zhp6T7k8tl\n l1O+WfvoOr/tnTZ/QqVkz5o1YKDXKzvDwTm6V+doQFd0SLh1aIUndpVbr\n Ohd5twM5lzcRqUF3GPcCxVGNNYsRYvdfTnJm6vw19PfY6BLHmNlNElLe4\n A==;", "X-Mailman-Original-Authentication-Results": [ "smtp4.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=intel.com", "smtp4.osuosl.org;\n dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com\n header.a=rsa-sha256 header.s=Intel header.b=EpQ+uD2Y" ], "Subject": "[Intel-wired-lan] [PATCH net] ice: stop DCBNL requests during\n driver unload", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "From: Dave Ertman <david.m.ertman@intel.com>\n\nWith a chatty lldpad, DCB configuration requests can arrive through\nthe DCBNL API while the driver is tearing down PF resources, leading\nto use-after-free and NULL dereference crashes.\n\nSet ICE_SHUTTING_DOWN in pf->state at the start of ice_remove() and\ncheck this bit at the beginning of every DCBNL callback that accesses\nresources freed during the remove path.\n\nFixes: b94b013eb626 (\"ice: Implement DCBNL support\")\nCc: stable@vger.kernel.org\nSigned-off-by: Dave Ertman <david.m.ertman@intel.com>\nSigned-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>\n---\n\n drivers/net/ethernet/intel/ice/ice.h | 1 +\n drivers/net/ethernet/intel/ice/ice_dcb_nl.c | 46 +++++++++++++++++++++\n drivers/net/ethernet/intel/ice/ice_main.c | 1 +\n 3 files changed, 48 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h\nindex 2b2b22a..052c310 100644\n--- a/drivers/net/ethernet/intel/ice/ice.h\n+++ b/drivers/net/ethernet/intel/ice/ice.h\n@@ -283,6 +283,7 @@ enum ice_pf_state {\n \tICE_EMPR_RECV,\t\t/* set by OICR handler */\n \tICE_SUSPENDED,\t\t/* set on module remove path */\n \tICE_RESET_FAILED,\t\t/* set by reset/rebuild */\n+\tICE_SHUTTING_DOWN,\t\t/* set on module remove path, before releasing resources */\n \t/* When checking for the PF to be in a nominal operating state, the\n \t * bits that are grouped at the beginning of the list need to be\n \t * checked. Bits occurring before ICE_STATE_NOMINAL_CHECK_BITS will\ndiff --git a/drivers/net/ethernet/intel/ice/ice_dcb_nl.c b/drivers/net/ethernet/intel/ice/ice_dcb_nl.c\nindex a10c1c8d..4a30129 100644\n--- a/drivers/net/ethernet/intel/ice/ice_dcb_nl.c\n+++ b/drivers/net/ethernet/intel/ice/ice_dcb_nl.c\n@@ -15,6 +15,8 @@ static void ice_dcbnl_devreset(struct net_device *netdev)\n {\n \tstruct ice_pf *pf = ice_netdev_to_pf(netdev);\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn;\n \twhile (ice_is_reset_in_progress(pf->state))\n \t\tusleep_range(1000, 2000);\n \n@@ -35,6 +37,8 @@ static int ice_dcbnl_getets(struct net_device *netdev, struct ieee_ets *ets)\n \tstruct ice_pf *pf;\n \n \tpf = ice_netdev_to_pf(netdev);\n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn -EBUSY;\n \tdcbxcfg = &pf->hw.port_info->qos_cfg.local_dcbx_cfg;\n \n \tets->willing = dcbxcfg->etscfg.willing;\n@@ -66,6 +70,8 @@ static int ice_dcbnl_setets(struct net_device *netdev, struct ieee_ets *ets)\n \tint bwcfg = 0, bwrec = 0;\n \tint err, i;\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn -EBUSY;\n \tif ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) ||\n \t !(pf->dcbx_cap & DCB_CAP_DCBX_VER_IEEE))\n \t\treturn -EINVAL;\n@@ -135,6 +141,8 @@ ice_dcbnl_getnumtcs(struct net_device *dev, int __always_unused tcid, u8 *num)\n \n \tif (!test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags))\n \t\treturn -EINVAL;\n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn -EBUSY;\n \n \t*num = pf->hw.func_caps.common_cap.maxtc;\n \treturn 0;\n@@ -148,6 +156,8 @@ static u8 ice_dcbnl_getdcbx(struct net_device *netdev)\n {\n \tstruct ice_pf *pf = ice_netdev_to_pf(netdev);\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn 0;\n \treturn pf->dcbx_cap;\n }\n \n@@ -161,6 +171,8 @@ static u8 ice_dcbnl_setdcbx(struct net_device *netdev, u8 mode)\n \tstruct ice_pf *pf = ice_netdev_to_pf(netdev);\n \tstruct ice_qos_cfg *qos_cfg;\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn 0;\n \t/* if FW LLDP agent is running, DCBNL not allowed to change mode */\n \tif (test_bit(ICE_FLAG_FW_LLDP_AGENT, pf->flags))\n \t\treturn ICE_DCB_NO_HW_CHG;\n@@ -208,6 +220,8 @@ static void ice_dcbnl_get_perm_hw_addr(struct net_device *netdev, u8 *perm_addr)\n \tstruct ice_port_info *pi = pf->hw.port_info;\n \tint i, j;\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn;\n \tmemset(perm_addr, 0xff, MAX_ADDR_LEN);\n \n \tfor (i = 0; i < netdev->addr_len; i++)\n@@ -242,6 +256,8 @@ static int ice_dcbnl_getpfc(struct net_device *netdev, struct ieee_pfc *pfc)\n \tstruct ice_dcbx_cfg *dcbxcfg;\n \tint i;\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn -EBUSY;\n \tdcbxcfg = &pi->qos_cfg.local_dcbx_cfg;\n \tpfc->pfc_cap = dcbxcfg->pfc.pfccap;\n \tpfc->pfc_en = dcbxcfg->pfc.pfcena;\n@@ -267,6 +283,8 @@ static int ice_dcbnl_setpfc(struct net_device *netdev, struct ieee_pfc *pfc)\n \tstruct ice_dcbx_cfg *new_cfg;\n \tint err;\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn -EBUSY;\n \tif ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) ||\n \t !(pf->dcbx_cap & DCB_CAP_DCBX_VER_IEEE))\n \t\treturn -EINVAL;\n@@ -308,6 +326,8 @@ ice_dcbnl_get_pfc_cfg(struct net_device *netdev, int prio, u8 *setting)\n \tstruct ice_pf *pf = ice_netdev_to_pf(netdev);\n \tstruct ice_port_info *pi = pf->hw.port_info;\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn;\n \tif ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) ||\n \t !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE))\n \t\treturn;\n@@ -331,6 +351,8 @@ static void ice_dcbnl_set_pfc_cfg(struct net_device *netdev, int prio, u8 set)\n \tstruct ice_pf *pf = ice_netdev_to_pf(netdev);\n \tstruct ice_dcbx_cfg *new_cfg;\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn;\n \tif ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) ||\n \t !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE))\n \t\treturn;\n@@ -364,6 +386,8 @@ static u8 ice_dcbnl_getpfcstate(struct net_device *netdev)\n \tstruct ice_pf *pf = ice_netdev_to_pf(netdev);\n \tstruct ice_port_info *pi = pf->hw.port_info;\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn 0;\n \t/* Return enabled if any UP enabled for PFC */\n \tif (pi->qos_cfg.local_dcbx_cfg.pfc.pfcena)\n \t\treturn 1;\n@@ -395,6 +419,8 @@ static u8 ice_dcbnl_setstate(struct net_device *netdev, u8 state)\n {\n \tstruct ice_pf *pf = ice_netdev_to_pf(netdev);\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn ICE_DCB_NO_HW_CHG;\n \tif ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) ||\n \t !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE))\n \t\treturn ICE_DCB_NO_HW_CHG;\n@@ -469,6 +495,8 @@ ice_dcbnl_set_pg_tc_cfg_tx(struct net_device *netdev, int tc,\n \tstruct ice_dcbx_cfg *new_cfg;\n \tint i;\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn;\n \tif ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) ||\n \t !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE))\n \t\treturn;\n@@ -504,6 +532,8 @@ ice_dcbnl_get_pg_bwg_cfg_tx(struct net_device *netdev, int pgid, u8 *bw_pct)\n \tstruct ice_pf *pf = ice_netdev_to_pf(netdev);\n \tstruct ice_port_info *pi = pf->hw.port_info;\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn;\n \tif ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) ||\n \t !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE))\n \t\treturn;\n@@ -528,6 +558,8 @@ ice_dcbnl_set_pg_bwg_cfg_tx(struct net_device *netdev, int pgid, u8 bw_pct)\n \tstruct ice_pf *pf = ice_netdev_to_pf(netdev);\n \tstruct ice_dcbx_cfg *new_cfg;\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn;\n \tif ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) ||\n \t !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE))\n \t\treturn;\n@@ -609,6 +641,8 @@ ice_dcbnl_get_pg_bwg_cfg_rx(struct net_device *netdev, int __always_unused pgid,\n {\n \tstruct ice_pf *pf = ice_netdev_to_pf(netdev);\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn;\n \tif ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) ||\n \t !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE))\n \t\treturn;\n@@ -643,6 +677,8 @@ static u8 ice_dcbnl_get_cap(struct net_device *netdev, int capid, u8 *cap)\n {\n \tstruct ice_pf *pf = ice_netdev_to_pf(netdev);\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn ICE_DCB_NO_HW_CHG;\n \tif (!(test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags)))\n \t\treturn ICE_DCB_NO_HW_CHG;\n \n@@ -695,6 +731,8 @@ static int ice_dcbnl_getapp(struct net_device *netdev, u8 idtype, u16 id)\n \t\t\t\t.protocol = id,\n \t\t\t };\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn -EBUSY;\n \tif ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) ||\n \t !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE))\n \t\treturn -EINVAL;\n@@ -738,6 +776,8 @@ static int ice_dcbnl_setapp(struct net_device *netdev, struct dcb_app *app)\n \tu8 max_tc;\n \tint ret;\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn -EBUSY;\n \t/* ONLY DSCP APP TLVs have operational significance */\n \tif (app->selector != IEEE_8021QAZ_APP_SEL_DSCP)\n \t\treturn -EINVAL;\n@@ -871,6 +911,8 @@ static int ice_dcbnl_delapp(struct net_device *netdev, struct dcb_app *app)\n \tunsigned int i, j;\n \tint ret = 0;\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn -EBUSY;\n \tif (pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) {\n \t\tnetdev_err(netdev, \"can't delete DSCP netlink app when FW DCB agent is active\\n\");\n \t\treturn -EINVAL;\n@@ -978,6 +1020,8 @@ static u8 ice_dcbnl_cee_set_all(struct net_device *netdev)\n \tstruct ice_dcbx_cfg *new_cfg;\n \tint err;\n \n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn ICE_DCB_NO_HW_CHG;\n \tif ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) ||\n \t !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE))\n \t\treturn ICE_DCB_NO_HW_CHG;\n@@ -1048,6 +1092,8 @@ void ice_dcbnl_set_all(struct ice_vsi *vsi)\n \t\treturn;\n \n \tpf = ice_netdev_to_pf(netdev);\n+\tif (test_bit(ICE_SHUTTING_DOWN, pf->state))\n+\t\treturn;\n \tpi = pf->hw.port_info;\n \n \t/* SW DCB taken care of by SW Default Config */\ndiff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex 685c9618..eff48bd 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -5424,6 +5424,7 @@ static void ice_remove(struct pci_dev *pdev)\n \tstruct ice_pf *pf = pci_get_drvdata(pdev);\n \tint i;\n \n+\tset_bit(ICE_SHUTTING_DOWN, pf->state);\n \tfor (i = 0; i < ICE_MAX_RESET_WAIT; i++) {\n \t\tif (!ice_is_reset_in_progress(pf->state))\n \t\t\tbreak;\n", "prefixes": [ "net" ] }