From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 2DD705B1C; Wed, 14 Nov 2018 12:24:48 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2018 03:24:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,232,1539673200"; d="scan'208";a="89203018" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga007.jf.intel.com with ESMTP; 14 Nov 2018 03:24:45 -0800 Received: from wgcvswdev001.ir.intel.com (wgcvswdev001.ir.intel.com [10.102.246.100]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id wAEBOigo011357; Wed, 14 Nov 2018 11:24:44 GMT Received: from wgcvswdev001.ir.intel.com (localhost [127.0.0.1]) by wgcvswdev001.ir.intel.com with ESMTP id wAEBOKZm000619; Wed, 14 Nov 2018 11:24:20 GMT Received: (from tchaitax@localhost) by wgcvswdev001.ir.intel.com with œ id wAEBOK9J000615; Wed, 14 Nov 2018 11:24:20 GMT From: Chaitanya Babu Talluri To: dev@dpdk.org Cc: byron.marohn@intel.com, reshma.pattan@intel.com, pablo.de.lara.guarch@intel.com, Chaitanya Babu Talluri , stable@dpdk.org Date: Wed, 14 Nov 2018 11:24:06 +0000 Message-Id: <1542194646-32724-1-git-send-email-tallurix.chaitanya.babu@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1542113714-22607-1-git-send-email-tallurix.chaitanya.babu@intel.com> References: <1542113714-22607-1-git-send-email-tallurix.chaitanya.babu@intel.com> Subject: [dpdk-dev] [PATCH v2] lib/efd: fix write unlock during ring creation 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: Wed, 14 Nov 2018 11:24:48 -0000 In rte_efd_create() write lock has already been unlocked before ring creation itself. So second unlock after the ring creation has been removed. Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library") Cc: stable@dpdk.org Signed-off-by: Chaitanya Babu Talluri Acked-by: Reshma Pattan --- v2: Updated commit message. --- lib/librte_efd/rte_efd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c index a780e2fe8..e6e5cfda2 100644 --- a/lib/librte_efd/rte_efd.c +++ b/lib/librte_efd/rte_efd.c @@ -692,7 +692,8 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len, offline_cpu_socket, 0); if (r == NULL) { RTE_LOG(ERR, EFD, "memory allocation failed\n"); - goto error_unlock_exit; + rte_efd_free(table); + return NULL; } /* Populate free slots ring. Entry zero is reserved for key misses. */ -- 2.13.6