[dpdk-stable] patch 'security: fix session counter' has been queued to LTS release 18.11.9

Kevin Traynor ktraynor at redhat.com
Thu May 28 18:22:29 CEST 2020


Hi,

FYI, your patch has been queued to LTS release 18.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/03/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/55e69e8b801281a3a6b568e5df12700c2bab3ade

Thanks.

Kevin.

---
>From 55e69e8b801281a3a6b568e5df12700c2bab3ade Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
Date: Thu, 9 Apr 2020 19:24:52 +0200
Subject: [PATCH] security: fix session counter

[ upstream commit e36b5a87d6d0e1e209d85dc22419924cbe02056c ]

Fix session counter to be decreased in rte_security_session_destroy
only when session was successfully destroyed.

Formerly session counter was decreased prior session destroying
and returning session object to mempool. It remained decreased even
if session was not destroyed and mempool object released making counter
invalid.

Fixes: c261d1431bd8 ("security: introduce security API and framework")

Signed-off-by: Lukasz Wojciechowski <l.wojciechow at partner.samsung.com>
Acked-by: Anoob Joseph <anoobj at marvell.com>
Acked-by: Akhil Goyal <akhil.goyal at nxp.com>
---
 lib/librte_security/rte_security.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lib/librte_security/rte_security.c b/lib/librte_security/rte_security.c
index 4f9639d693..56f30c88ba 100644
--- a/lib/librte_security/rte_security.c
+++ b/lib/librte_security/rte_security.c
@@ -91,12 +91,14 @@ rte_security_session_destroy(struct rte_security_ctx *instance,
 	RTE_PTR_OR_ERR_RET(sess, -EINVAL);
 
+	ret = instance->ops->session_destroy(instance->device, sess);
+	if (ret != 0)
+		return ret;
+
+	rte_mempool_put(rte_mempool_from_obj(sess), (void *)sess);
+
 	if (instance->sess_cnt)
 		instance->sess_cnt--;
 
-	ret = instance->ops->session_destroy(instance->device, sess);
-	if (!ret)
-		rte_mempool_put(rte_mempool_from_obj(sess), (void *)sess);
-
-	return ret;
+	return 0;
 }
 
-- 
2.21.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-28 17:13:01.314421212 +0100
+++ 0042-security-fix-session-counter.patch	2020-05-28 17:12:59.109556219 +0100
@@ -1 +1 @@
-From e36b5a87d6d0e1e209d85dc22419924cbe02056c Mon Sep 17 00:00:00 2001
+From 55e69e8b801281a3a6b568e5df12700c2bab3ade Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e36b5a87d6d0e1e209d85dc22419924cbe02056c ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index 38ccc2ea9c..d475b09771 100644
+index 4f9639d693..56f30c88ba 100644



More information about the stable mailing list