From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D23E427E1 for ; Mon, 20 Mar 2023 08:38:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 16503427F2; Mon, 20 Mar 2023 08:38:35 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 10ABB406BC; Mon, 20 Mar 2023 08:38:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679297912; x=1710833912; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ExRom1U0x2bX3whQvCoJNpL6GzJG1kRP3JuNU5x9pro=; b=T5TSUUleQi8B36H3qtRS/8Qj1/cFqf9Tjoq/hRF4bSzpQbzsSgdddcEi 7JSg6e9CEywLRRTOz4m/3AoeoSk/Q24TEYjpP6MZ49f4ez2RCmBYcunQ0 8kF0BsCJIFUBRVCJ416673Js6e3iufwDIgEtqxP3OXPCEDMCdLuS3nQUy iEzenoMDvPSBEYhBL2964OvF6a/meiAoLF2+u16+1Qy1ZxQNIH5JAfaor D9u/CQ9FNd7IPyFFhvMLIvLIQcCpl64xV/dFZahXc76RhNmVkg3LXzWqY myhWHjICqt5Mm4Fo4suZNrtthV0b9gPlK3RQBpzQbi7sTjHeIdGAa4DN+ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10654"; a="336097053" X-IronPort-AV: E=Sophos;i="5.98,274,1673942400"; d="scan'208";a="336097053" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2023 00:38:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10654"; a="855190218" X-IronPort-AV: E=Sophos;i="5.98,274,1673942400"; d="scan'208";a="855190218" Received: from dpdk-beileix-3.sh.intel.com ([10.67.110.253]) by orsmga005.jf.intel.com with ESMTP; 20 Mar 2023 00:38:29 -0700 From: beilei.xing@intel.com To: jingjing.wu@intel.com Cc: dev@dpdk.org, Beilei Xing , stable@dpdk.org Subject: [PATCH] net/idpf: cancel alarm when fail to init adapter Date: Mon, 20 Mar 2023 07:06:22 +0000 Message-Id: <20230320070622.28776-1-beilei.xing@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Beilei Xing Cancel alarm if failing to allocate vports memory during adapter_ext initialization. Otherwise, there'll be segmentation fault when fail to initialize adapter_ext. Fixes: b2f9d4788d5c ("common/idpf: introduce adapter init/deinit") Cc: stable@dpdk.org Signed-off-by: Beilei Xing --- drivers/net/idpf/idpf_ethdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c index 46aec6ae37..d8b5bc3e39 100644 --- a/drivers/net/idpf/idpf_ethdev.c +++ b/drivers/net/idpf/idpf_ethdev.c @@ -1172,6 +1172,7 @@ idpf_adapter_ext_init(struct rte_pci_device *pci_dev, struct idpf_adapter_ext *a return ret; err_get_ptype: + rte_eal_alarm_cancel(idpf_dev_alarm_handler, adapter); idpf_adapter_deinit(base); err_adapter_init: return ret; -- 2.26.2