From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 0DB232C36; Tue, 3 Jan 2017 07:55:57 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP; 02 Jan 2017 22:55:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,451,1477983600"; d="scan'208";a="918351231" Received: from dpdk26.sh.intel.com ([10.239.128.228]) by orsmga003.jf.intel.com with ESMTP; 02 Jan 2017 22:55:56 -0800 From: Wenzhuo Lu To: dev@dpdk.org Cc: Bernard Iremonger , stable@dpdk.org Date: Tue, 3 Jan 2017 14:54:47 +0800 Message-Id: <1483426488-117332-27-git-send-email-wenzhuo.lu@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1483426488-117332-1-git-send-email-wenzhuo.lu@intel.com> References: <1480637533-37425-1-git-send-email-wenzhuo.lu@intel.com> <1483426488-117332-1-git-send-email-wenzhuo.lu@intel.com> Subject: [dpdk-dev] [PATCH v7 26/27] net/i40e: fix segmentation fault in close X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2017 06:55:58 -0000 From: Bernard Iremonger The vsi's have already been released, so the second call to i40e_vsi_release results in a segmentation fault. The second call to i40e_vsi_release has been removed. Fixes: 3cb446b4aeb2 ("i40e: free vmdq vsi when closing") CC: stable@dpdk.org Signed-off-by: Bernard Iremonger --- drivers/net/i40e/i40e_ethdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index be45cfa..0b7c366 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -1882,7 +1882,6 @@ static inline void i40e_GLQF_reg_init(struct i40e_hw *hw) i40e_vsi_release(pf->main_vsi); for (i = 0; i < pf->nb_cfg_vmdq_vsi; i++) { - i40e_vsi_release(pf->vmdq[i].vsi); pf->vmdq[i].vsi = NULL; } @@ -4137,6 +4136,9 @@ enum i40e_status_code if (!vsi) return I40E_SUCCESS; + if (!vsi->adapter) + return I40E_ERR_BAD_PTR; + user_param = vsi->user_param; pf = I40E_VSI_TO_PF(vsi); -- 1.9.3