patch 'common/cnxk: fix null pointer checks' has been queued to stable release 22.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Jun 30 14:25:37 CEST 2025
Hi,
FYI, your patch has been queued to stable release 22.11.9
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/02/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/8a9907fdd54b083bbf8f3648568ef1b6fcc5d354
Thanks.
Luca Boccassi
---
>From 8a9907fdd54b083bbf8f3648568ef1b6fcc5d354 Mon Sep 17 00:00:00 2001
From: Rahul Bhansali <rbhansali at marvell.com>
Date: Mon, 23 Jun 2025 10:19:07 +0530
Subject: [PATCH] common/cnxk: fix null pointer checks
[ upstream commit bba99bb88c4f2bf3391ade016d808b27a8a17a19 ]
Adds null pointer check before executing CPT instruction.
Fixes: 4d00b8c6a331 ("common/cnxk: allocate dynamic BPIDs")
Fixes: 4af4e36a93d7 ("common/cnxk: support inline device API without ROC NIX")
Signed-off-by: Rahul Bhansali <rbhansali at marvell.com>
---
drivers/common/cnxk/roc_nix_inl.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c
index 15fec65d93..163c875a73 100644
--- a/drivers/common/cnxk/roc_nix_inl.c
+++ b/drivers/common/cnxk/roc_nix_inl.c
@@ -1253,7 +1253,7 @@ roc_nix_inl_sa_sync(struct roc_nix *roc_nix, void *sa, bool inb,
if (idev)
inl_dev = idev->nix_inl_dev;
- if (!inl_dev && roc_nix == NULL)
+ if ((!inl_dev && roc_nix == NULL) || sa == NULL)
return -EINVAL;
if (roc_nix) {
@@ -1316,7 +1316,7 @@ roc_nix_inl_ctx_write(struct roc_nix *roc_nix, void *sa_dptr, void *sa_cptr,
if (idev)
inl_dev = idev->nix_inl_dev;
- if (!inl_dev && roc_nix == NULL)
+ if ((!inl_dev && roc_nix == NULL) || sa_dptr == NULL || sa_cptr == NULL)
return -EINVAL;
if (roc_nix) {
--
2.47.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-06-30 13:21:22.050251771 +0100
+++ 0007-common-cnxk-fix-null-pointer-checks.patch 2025-06-30 13:21:21.743057270 +0100
@@ -1 +1 @@
-From bba99bb88c4f2bf3391ade016d808b27a8a17a19 Mon Sep 17 00:00:00 2001
+From 8a9907fdd54b083bbf8f3648568ef1b6fcc5d354 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bba99bb88c4f2bf3391ade016d808b27a8a17a19 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -14,2 +15,2 @@
- drivers/common/cnxk/roc_nix_inl.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ drivers/common/cnxk/roc_nix_inl.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
@@ -18 +19 @@
-index bee8e25c7c..c7637ddbdc 100644
+index 15fec65d93..163c875a73 100644
@@ -21,10 +22 @@
-@@ -1312,7 +1312,7 @@ static int
- nix_inl_legacy_inb_init(struct roc_nix *roc_nix)
- {
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
-- struct roc_cpt_inline_ipsec_inb_cfg cfg;
-+ struct roc_cpt_inline_ipsec_inb_cfg cfg = {0};
- struct idev_cfg *idev = idev_get_cfg();
- uint16_t bpids[ROC_NIX_MAX_BPID_CNT];
- struct roc_cpt *roc_cpt;
-@@ -2219,7 +2219,7 @@ roc_nix_inl_sa_sync(struct roc_nix *roc_nix, void *sa, bool inb,
+@@ -1253,7 +1253,7 @@ roc_nix_inl_sa_sync(struct roc_nix *roc_nix, void *sa, bool inb,
@@ -39 +31 @@
-@@ -2299,7 +2299,7 @@ roc_nix_inl_ctx_write(struct roc_nix *roc_nix, void *sa_dptr, void *sa_cptr,
+@@ -1316,7 +1316,7 @@ roc_nix_inl_ctx_write(struct roc_nix *roc_nix, void *sa_dptr, void *sa_cptr,
More information about the stable
mailing list