patch 'cryptodev: reset pointer after failure in callback init' has been queued to stable release 25.11.3
Kevin Traynor
ktraynor at redhat.com
Tue Jul 28 17:55:35 CEST 2026
Hi,
FYI, your patch has been queued to stable release 25.11.3
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/01/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/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/3ebc98c2f085d4b1478ead3e04757bc0e6718cc7
Thanks.
Kevin
---
>From 3ebc98c2f085d4b1478ead3e04757bc0e6718cc7 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 c0f57413fe..3784ce6b48 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -801,4 +801,5 @@ cryptodev_cb_init(struct rte_cryptodev *dev)
CDEV_LOG_ERR("Failed to allocate memory for deq callbacks");
rte_free(dev->enq_cbs);
+ dev->enq_cbs = NULL;
return -ENOMEM;
}
--
2.55.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-07-28 16:54:50.999205245 +0100
+++ 0005-cryptodev-reset-pointer-after-failure-in-callback-in.patch 2026-07-28 16:54:50.753728363 +0100
@@ -1 +1 @@
-From 07ac3252661f27627c2a3c0e244d89928d67e71e Mon Sep 17 00:00:00 2001
+From 3ebc98c2f085d4b1478ead3e04757bc0e6718cc7 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 c0f57413fe..3784ce6b48 100644
@@ -32 +33 @@
-@@ -812,4 +812,5 @@ cryptodev_cb_init(struct rte_cryptodev *dev)
+@@ -801,4 +801,5 @@ cryptodev_cb_init(struct rte_cryptodev *dev)
More information about the stable
mailing list