DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH] hash: fix missing spinlock unlock in add key
@ 2018-03-04 14:58 Pavan Nikhilesh
  2018-03-14 13:06 ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 3+ messages in thread
From: Pavan Nikhilesh @ 2018-03-04 14:58 UTC (permalink / raw)
  To: jerin.jacob, bruce.richardson, pablo.de.lara.guarch
  Cc: dev, Pavan Nikhilesh, stable

Fix missing spinlock unlock during add key when key is already present.

Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel TSX")
Cc: stable@dpdk.org

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 lib/librte_hash/rte_cuckoo_hash.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/librte_hash/rte_cuckoo_hash.c b/lib/librte_hash/rte_cuckoo_hash.c
index 9b1387b5e..a07543a29 100644
--- a/lib/librte_hash/rte_cuckoo_hash.c
+++ b/lib/librte_hash/rte_cuckoo_hash.c
@@ -552,7 +552,8 @@ __rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key,
 				 * Return index where key is stored,
 				 * subtracting the first dummy index
 				 */
-				return prim_bkt->key_idx[i] - 1;
+				ret = prim_bkt->key_idx[i] - 1;
+				goto failure;
 			}
 		}
 	}
@@ -572,7 +573,8 @@ __rte_hash_add_key_with_hash(const struct rte_hash *h, const void *key,
 				 * Return index where key is stored,
 				 * subtracting the first dummy index
 				 */
-				return sec_bkt->key_idx[i] - 1;
+				ret = sec_bkt->key_idx[i] - 1;
+				goto failure;
 			}
 		}
 	}
-- 
2.16.2

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] hash: fix missing spinlock unlock in add key
  2018-03-04 14:58 [dpdk-dev] [PATCH] hash: fix missing spinlock unlock in add key Pavan Nikhilesh
@ 2018-03-14 13:06 ` De Lara Guarch, Pablo
  2018-04-10 15:12   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: De Lara Guarch, Pablo @ 2018-03-14 13:06 UTC (permalink / raw)
  To: Pavan Nikhilesh, jerin.jacob, Richardson, Bruce; +Cc: dev, stable



> -----Original Message-----
> From: Pavan Nikhilesh [mailto:pbhagavatula@caviumnetworks.com]
> Sent: Sunday, March 4, 2018 2:59 PM
> To: jerin.jacob@caviumnetworks.com; Richardson, Bruce
> <bruce.richardson@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>
> Cc: dev@dpdk.org; Pavan Nikhilesh
> <pbhagavatula@caviumnetworks.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] hash: fix missing spinlock unlock in add key
> 
> Fix missing spinlock unlock during add key when key is already present.
> 
> Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel
> TSX")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] hash: fix missing spinlock unlock in add key
  2018-03-14 13:06 ` De Lara Guarch, Pablo
@ 2018-04-10 15:12   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-04-10 15:12 UTC (permalink / raw)
  To: Pavan Nikhilesh
  Cc: dev, De Lara Guarch, Pablo, jerin.jacob, Richardson, Bruce, stable

> > Fix missing spinlock unlock during add key when key is already present.
> > 
> > Fixes: be856325cba3 ("hash: add scalable multi-writer insertion with Intel
> > TSX")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
> 
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-10 15:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-04 14:58 [dpdk-dev] [PATCH] hash: fix missing spinlock unlock in add key Pavan Nikhilesh
2018-03-14 13:06 ` De Lara Guarch, Pablo
2018-04-10 15:12   ` Thomas Monjalon

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