patch 'vhost/crypto: fix descriptor processing' has been queued to stable release 19.11.13

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Thu Jul 7 09:55:03 CEST 2022


Hi,

FYI, your patch has been queued to stable release 19.11.13

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/09/22. 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/05166062e73463e7e30ab36ded00e7bc86b81312

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 05166062e73463e7e30ab36ded00e7bc86b81312 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Wed, 22 Jun 2022 17:30:20 +0200
Subject: [PATCH] vhost/crypto: fix descriptor processing

[ upstream commit 2fbada91545c004f04449500af0c6276900317ab ]

copy_data was returning a pointer to an increased (off by one) descriptor.
Subsequent calls to copy_data in the library were then failing.
Fix this by incrementing the descriptor only if there is some left data
to copy.

Fixes: 4414bb67010d ("vhost/crypto: fix build with GCC 12")

Reported-by: Jakub Poczatek <jakub.poczatek at intel.com>
Signed-off-by: David Marchand <david.marchand at redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Tested-by: Jakub Poczatek <jakub.poczatek at intel.com>
Acked-by: Fan Zhang <roy.fan.zhang at intel.com>
---
 lib/librte_vhost/vhost_crypto.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
index b8bdfe4bc7..4f91715c33 100644
--- a/lib/librte_vhost/vhost_crypto.c
+++ b/lib/librte_vhost/vhost_crypto.c
@@ -611,8 +611,7 @@ copy_data(void *data, struct vhost_crypto_data_req *vc_req,
 			return -1;
 		left -= copied;
 		data = RTE_PTR_ADD(data, copied);
-		desc++;
-	} while (desc < head + max_n_descs && left != 0);
+	} while (left != 0 && ++desc < head + max_n_descs);
 
 	if (unlikely(left != 0))
 		return -1;
-- 
2.37.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-07-07 09:54:13.975432505 +0200
+++ 0068-vhost-crypto-fix-descriptor-processing.patch	2022-07-07 09:54:10.981824716 +0200
@@ -1 +1 @@
-From 2fbada91545c004f04449500af0c6276900317ab Mon Sep 17 00:00:00 2001
+From 05166062e73463e7e30ab36ded00e7bc86b81312 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2fbada91545c004f04449500af0c6276900317ab ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
- lib/vhost/vhost_crypto.c | 3 +--
+ lib/librte_vhost/vhost_crypto.c | 3 +--
@@ -23,5 +24,5 @@
-diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
-index 96ffb82a5d..54946f46d9 100644
---- a/lib/vhost/vhost_crypto.c
-+++ b/lib/vhost/vhost_crypto.c
-@@ -610,8 +610,7 @@ copy_data(void *data, struct vhost_crypto_data_req *vc_req,
+diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c
+index b8bdfe4bc7..4f91715c33 100644
+--- a/lib/librte_vhost/vhost_crypto.c
++++ b/lib/librte_vhost/vhost_crypto.c
+@@ -611,8 +611,7 @@ copy_data(void *data, struct vhost_crypto_data_req *vc_req,


More information about the stable mailing list