patch 'cryptodev: reset pointer after failure in callback init' has been queued to stable release 24.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Jun 11 15:20:38 CEST 2026


Hi,

FYI, your patch has been queued to stable release 24.11.7

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/13/26. 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/bluca/dpdk-stable

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

Thanks.

Luca Boccassi

---
>From c943d8fb706154f0bdd01d56dbb3f1edba582804 Mon Sep 17 00:00:00 2001
From: Daniil Iskhakov <dish at amicon.ru>
Date: Thu, 16 Apr 2026 12:34:36 +0300
Subject: [PATCH] cryptodev: reset pointer after failure in callback init

[ upstream commit 07ac3252661f27627c2a3c0e244d89928d67e71e ]

cryptodev_cb_init() may free partially allocated resources on failure,
but does not reset their pointers afterwards.

A later call to cryptodev_cb_cleanup() may then attempt to release both
resources even when one of them has already been freed, because the
cleanup logic does not rely on both pointers being valid independently.

Set freed pointers to NULL in the cryptodev_cb_init() error path to
make subsequent cleanup safe.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 1c3ffb95595e ("cryptodev: add enqueue and dequeue callbacks")

Signed-off-by: Daniil Agalakov <ade at amicon.ru>
Signed-off-by: Daniil Iskhakov <dish at amicon.ru>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar at intel.com>
---
 lib/cryptodev/rte_cryptodev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 4fa32c2d08..c75ddf7149 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -713,6 +713,7 @@ cryptodev_cb_init(struct rte_cryptodev *dev)
 	if (dev->deq_cbs == NULL) {
 		CDEV_LOG_ERR("Failed to allocate memory for deq callbacks");
 		rte_free(dev->enq_cbs);
+		dev->enq_cbs = NULL;
 		return -ENOMEM;
 	}
 
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-06-11 14:20:04.838826643 +0100
+++ 0089-cryptodev-reset-pointer-after-failure-in-callback-in.patch	2026-06-11 14:20:01.334748898 +0100
@@ -1 +1 @@
-From 07ac3252661f27627c2a3c0e244d89928d67e71e Mon Sep 17 00:00:00 2001
+From c943d8fb706154f0bdd01d56dbb3f1edba582804 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 07ac3252661f27627c2a3c0e244d89928d67e71e ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
@@ -29 +30 @@
-index 50071935c2..5cb9c93c77 100644
+index 4fa32c2d08..c75ddf7149 100644
@@ -32 +33 @@
-@@ -811,6 +811,7 @@ cryptodev_cb_init(struct rte_cryptodev *dev)
+@@ -713,6 +713,7 @@ cryptodev_cb_init(struct rte_cryptodev *dev)


More information about the stable mailing list