diff mbox series

[v2] lib/efd: fix write unlock during ring creation

Message ID 1542194646-32724-1-git-send-email-tallurix.chaitanya.babu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series [v2] lib/efd: fix write unlock during ring creation | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Chaitanya Babu, TalluriX Nov. 14, 2018, 11:24 a.m. UTC
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 <tallurix.chaitanya.babu@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
---
v2: Updated commit message.
---
 lib/librte_efd/rte_efd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ferruh Yigit Nov. 16, 2018, 1:39 p.m. UTC | #1
On 11/14/2018 11:24 AM, Chaitanya Babu Talluri wrote:
> 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 <tallurix.chaitanya.babu@intel.com>
> Acked-by: Reshma Pattan <reshma.pattan@intel.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Thomas Monjalon Nov. 18, 2018, 2:46 p.m. UTC | #2
16/11/2018 14:39, Ferruh Yigit:
> On 11/14/2018 11:24 AM, Chaitanya Babu Talluri wrote:
> > 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 <tallurix.chaitanya.babu@intel.com>
> > Acked-by: Reshma Pattan <reshma.pattan@intel.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks
diff mbox series

Patch

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. */