[dpdk-stable] patch 'test/crypto: fix mbuf reset after null check' has been queued to stable release 19.11.10

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Aug 10 17:39:18 CEST 2021


Hi,

FYI, your patch has been queued to stable release 19.11.10

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/12/21. 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/cpaelzer/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/9ab830c078d0a89f1f604b5149935e0ed7b55d68

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 9ab830c078d0a89f1f604b5149935e0ed7b55d68 Mon Sep 17 00:00:00 2001
From: Thierry Herbelot <thierry.herbelot at 6wind.com>
Date: Mon, 24 May 2021 11:01:13 +0200
Subject: [PATCH] test/crypto: fix mbuf reset after null check

[ upstream commit 2b81eb2c992b2e3728b8866cf6199cfd3b5fd776 ]

Use m only after it was checked not to be NULL.

Fixes: 202d375c60bc1 ("app/test: add cryptodev unit and performance tests")

Signed-off-by: Thierry Herbelot <thierry.herbelot at 6wind.com>
Acked-by: Akhil Goyal <gakhil at marvell.com>
---
 app/test/test_cryptodev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index 1047c5e038..7686c7caec 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -112,10 +112,11 @@ setup_test_string(struct rte_mempool *mpool,
 	struct rte_mbuf *m = rte_pktmbuf_alloc(mpool);
 	size_t t_len = len - (blocksize ? (len % blocksize) : 0);
 
-	memset(m->buf_addr, 0, m->buf_len);
 	if (m) {
-		char *dst = rte_pktmbuf_append(m, t_len);
+		char *dst;
 
+		memset(m->buf_addr, 0, m->buf_len);
+		dst = rte_pktmbuf_append(m, t_len);
 		if (!dst) {
 			rte_pktmbuf_free(m);
 			return NULL;
-- 
2.32.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-08-10 15:11:14.529973531 +0200
+++ 0038-test-crypto-fix-mbuf-reset-after-null-check.patch	2021-08-10 15:11:12.994637927 +0200
@@ -1 +1 @@
-From 2b81eb2c992b2e3728b8866cf6199cfd3b5fd776 Mon Sep 17 00:00:00 2001
+From 9ab830c078d0a89f1f604b5149935e0ed7b55d68 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2b81eb2c992b2e3728b8866cf6199cfd3b5fd776 ]
+
@@ -9 +10,0 @@
-Cc: stable at dpdk.org
@@ -18 +19 @@
-index ead8c6e3dc..dd1669e007 100644
+index 1047c5e038..7686c7caec 100644
@@ -21 +22 @@
-@@ -135,10 +135,11 @@ setup_test_string(struct rte_mempool *mpool,
+@@ -112,10 +112,11 @@ setup_test_string(struct rte_mempool *mpool,


More information about the stable mailing list