From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by dpdk.org (Postfix) with ESMTP id 5F0AE5B30 for ; Mon, 30 Jul 2018 18:21:47 +0200 (CEST) Received: from 1.general.paelzer.uk.vpn ([10.172.196.172] helo=lap.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fkAsI-00009D-1C; Mon, 30 Jul 2018 16:18:22 +0000 From: Christian Ehrhardt To: Qi Zhang Cc: Remy Horton , dpdk stable Date: Mon, 30 Jul 2018 18:13:15 +0200 Message-Id: <20180730161342.16566-150-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180730161342.16566-1-christian.ehrhardt@canonical.com> References: <20180730161342.16566-1-christian.ehrhardt@canonical.com> Subject: [dpdk-stable] patch 'net/ixgbe: fix missing null check on detach' has been queued to stable release 18.05.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jul 2018 16:21:47 -0000 Hi, FYI, your patch has been queued to stable release 18.05.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/01/18. So please shout if anyone has objections. Thanks. Christian Ehrhardt --- >>From eae0b860ceb2eb286a5e3bb1329bf90acfc6c625 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Mon, 16 Jul 2018 20:47:04 +0800 Subject: [PATCH] net/ixgbe: fix missing null check on detach [ upstream commit 1ec01cd0962abd1fe2f32322ff135ac708cb3b8d ] Add missing NULL point check inside ixgbe_pf_host_uninit, or it may cause segment fault when detaching a device. Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports") Signed-off-by: Qi Zhang Acked-by: Remy Horton --- drivers/net/ixgbe/ixgbe_pf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c index c381acf44..4b833ffab 100644 --- a/drivers/net/ixgbe/ixgbe_pf.c +++ b/drivers/net/ixgbe/ixgbe_pf.c @@ -128,8 +128,6 @@ void ixgbe_pf_host_uninit(struct rte_eth_dev *eth_dev) PMD_INIT_FUNC_TRACE(); - vfinfo = IXGBE_DEV_PRIVATE_TO_P_VFDATA(eth_dev->data->dev_private); - RTE_ETH_DEV_SRIOV(eth_dev).active = 0; RTE_ETH_DEV_SRIOV(eth_dev).nb_q_per_pool = 0; RTE_ETH_DEV_SRIOV(eth_dev).def_vmdq_idx = 0; @@ -139,6 +137,10 @@ void ixgbe_pf_host_uninit(struct rte_eth_dev *eth_dev) if (vf_num == 0) return; + vfinfo = IXGBE_DEV_PRIVATE_TO_P_VFDATA(eth_dev->data->dev_private); + if (*vfinfo == NULL) + return; + ret = rte_eth_switch_domain_free((*vfinfo)->switch_domain_id); if (ret) PMD_INIT_LOG(WARNING, "failed to free switch domain: %d", ret); -- 2.17.1