patch 'crypto/ipsec_mb: remove unnecessary null check' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Mon Feb 27 07:59:22 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.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 03/01/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=11f862d6051c0225043c55cd1aed9d169e54b73b

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 11f862d6051c0225043c55cd1aed9d169e54b73b Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Fri, 13 Jan 2023 10:44:25 -0800
Subject: [PATCH] crypto/ipsec_mb: remove unnecessary null check
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 2245ccf74674e73dc4352fa348f0aa3958dcd67a ]

The function rte_ring_free() accepts NULL as valid input
like free() and other functions.

Found with null_free_check.cocci.

Fixes: 16d6ebb65d59 ("crypto/ipsec_mb: fix null checks")

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
Acked-by: Fan Zhang <fanzhang.oss at gmail.com>
Acked-by: Kai Ji <kai.ji at intel.com>
---
 drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
index 71e02cd051..3e52f95674 100644
--- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
+++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c
@@ -139,15 +139,12 @@ int
 ipsec_mb_qp_release(struct rte_cryptodev *dev, uint16_t qp_id)
 {
 	struct ipsec_mb_qp *qp = dev->data->queue_pairs[qp_id];
-	struct rte_ring *r = NULL;

 	if (!qp)
 		return 0;

 	if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
-		r = rte_ring_lookup(qp->name);
-		if (r)
-			rte_ring_free(r);
+		rte_ring_free(rte_ring_lookup(qp->name));

 #if IMB_VERSION(1, 1, 0) > IMB_VERSION_NUM
 		if (qp->mb_mgr)
--
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-27 14:08:42.676390000 +0800
+++ 0055-crypto-ipsec_mb-remove-unnecessary-null-check.patch	2023-02-27 14:08:40.779237000 +0800
@@ -1 +1 @@
-From 2245ccf74674e73dc4352fa348f0aa3958dcd67a Mon Sep 17 00:00:00 2001
+From 11f862d6051c0225043c55cd1aed9d169e54b73b Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 2245ccf74674e73dc4352fa348f0aa3958dcd67a ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org


More information about the stable mailing list