DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
To: dev@dpdk.org
Cc: byron.marohn@intel.com, reshma.pattan@intel.com,
	pablo.de.lara.guarch@intel.com,
	Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH v2] lib/efd: fix write unlock during ring creation
Date: Wed, 14 Nov 2018 11:24:06 +0000	[thread overview]
Message-ID: <1542194646-32724-1-git-send-email-tallurix.chaitanya.babu@intel.com> (raw)
In-Reply-To: <1542113714-22607-1-git-send-email-tallurix.chaitanya.babu@intel.com>

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(-)

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

  parent reply	other threads:[~2018-11-14 11:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 12:55 [dpdk-dev] [PATCH] lib: " Chaitanya Babu Talluri
2018-11-13 16:58 ` Pattan, Reshma
2018-11-18 14:43   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2018-11-14 11:24 ` Chaitanya Babu Talluri [this message]
2018-11-16 13:39   ` [dpdk-dev] [dpdk-stable] [PATCH v2] lib/efd: " Ferruh Yigit
2018-11-18 14:46     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1542194646-32724-1-git-send-email-tallurix.chaitanya.babu@intel.com \
    --to=tallurix.chaitanya.babu@intel.com \
    --cc=byron.marohn@intel.com \
    --cc=dev@dpdk.org \
    --cc=pablo.de.lara.guarch@intel.com \
    --cc=reshma.pattan@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).