patch 'crypto/virtio: fix redundant queue free' has been queued to stable release 24.11.2

Kevin Traynor ktraynor at redhat.com
Thu Feb 13 10:58:00 CET 2025


Hi,

FYI, your patch has been queued to stable release 24.11.2

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

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

Thanks.

Kevin

---
>From df76613de641c3c8c4f11c714985cc25cae1e270 Mon Sep 17 00:00:00 2001
From: Rajesh Mudimadugula <rmudimadugul at marvell.com>
Date: Wed, 27 Nov 2024 14:12:48 +0000
Subject: [PATCH] crypto/virtio: fix redundant queue free

[ upstream commit 89241aba832c044a9efb99329cfaa9faff8a6c4e ]

Remove multiple invocations of virtio_crypto_queue_release,
and set virtio crypto queue as null upon free to avoid
segfaults.

Fixes: 6f0175ff53e0 ("crypto/virtio: support basic PMD ops")

Signed-off-by: Rajesh Mudimadugula <rmudimadugul at marvell.com>
Acked-by: Akhil Goyal <gakhil at marvell.com>
---
 .mailmap                                 |  1 +
 drivers/crypto/virtio/virtio_cryptodev.c | 11 +++++------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/.mailmap b/.mailmap
index 58811dac34..37e2087ec1 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1252,4 +1252,5 @@ Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>
 Rahul Shah <rahul.r.shah at intel.com>
 Raja Zidane <rzidane at nvidia.com>
+Rajesh Mudimadugula <rmudimadugul at marvell.com>
 Rajesh Ravi <rajesh.ravi at broadcom.com>
 Rakesh Kudurumalla <rkudurumalla at marvell.com> <rkudurumalla at caviumnetworks.com>
diff --git a/drivers/crypto/virtio/virtio_cryptodev.c b/drivers/crypto/virtio/virtio_cryptodev.c
index 643921dc02..98415af123 100644
--- a/drivers/crypto/virtio/virtio_cryptodev.c
+++ b/drivers/crypto/virtio/virtio_cryptodev.c
@@ -479,8 +479,11 @@ virtio_crypto_free_queues(struct rte_cryptodev *dev)
 	/* control queue release */
 	virtio_crypto_queue_release(hw->cvq);
+	hw->cvq = NULL;
 
 	/* data queue release */
-	for (i = 0; i < hw->max_dataqueues; i++)
+	for (i = 0; i < hw->max_dataqueues; i++) {
 		virtio_crypto_queue_release(dev->data->queue_pairs[i]);
+		dev->data->queue_pairs[i] = NULL;
+	}
 }
 
@@ -614,4 +617,5 @@ virtio_crypto_qp_release(struct rte_cryptodev *dev, uint16_t queue_pair_id)
 
 	virtio_crypto_queue_release(vq);
+	dev->data->queue_pairs[queue_pair_id] = NULL;
 	return 0;
 }
@@ -761,6 +765,4 @@ static int
 virtio_crypto_dev_uninit(struct rte_cryptodev *cryptodev)
 {
-	struct virtio_crypto_hw *hw = cryptodev->data->dev_private;
-
 	PMD_INIT_FUNC_TRACE();
 
@@ -777,7 +779,4 @@ virtio_crypto_dev_uninit(struct rte_cryptodev *cryptodev)
 	cryptodev->dequeue_burst = NULL;
 
-	/* release control queue */
-	virtio_crypto_queue_release(hw->cvq);
-
 	rte_free(cryptodev->data);
 	cryptodev->data = NULL;
-- 
2.48.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-02-12 17:29:38.153245255 +0000
+++ 0033-crypto-virtio-fix-redundant-queue-free.patch	2025-02-12 17:29:34.301945637 +0000
@@ -1 +1 @@
-From 89241aba832c044a9efb99329cfaa9faff8a6c4e Mon Sep 17 00:00:00 2001
+From df76613de641c3c8c4f11c714985cc25cae1e270 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 89241aba832c044a9efb99329cfaa9faff8a6c4e ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -21 +22 @@
-index 8524952d24..e428ed3dec 100644
+index 58811dac34..37e2087ec1 100644
@@ -24 +25 @@
-@@ -1253,4 +1253,5 @@ Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>
+@@ -1252,4 +1252,5 @@ Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>



More information about the stable mailing list