patch 'net/sfc: remove null dereference in log' has been queued to stable release 22.11.4

Xueming Li xuemingl at nvidia.com
Mon Dec 11 11:11:41 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.4

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

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 28f7dd30ee751f439839811ffa99395f6503ccb0 Mon Sep 17 00:00:00 2001
From: Weiguo Li <liweiguo at xencore.cn>
Date: Sat, 4 Nov 2023 15:37:15 +0800
Subject: [PATCH] net/sfc: remove null dereference in log
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit d05ce802f39dd4a67c18f9dbe1a00901429ba191 ]

When ctx->sa is null, sfc_err(ctx->sa, ...) will trigger a null
dereference in the macro of sfc_err. Use SFC_GENERIC_LOG(ERR, ...)
to avoid that.

Fixes: 44db08d53be3 ("net/sfc: maintain controller to EFX interface mapping")

Signed-off-by: Weiguo Li <liweiguo at xencore.cn>
Reviewed-by: Ferruh Yigit <ferruh.yigit at amd.com>
---
 drivers/net/sfc/sfc_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 2ec743ebce..170ee57931 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -2055,7 +2055,7 @@ sfc_process_mport_journal_cb(void *data, efx_mport_desc_t *mport,
 	struct sfc_mport_journal_ctx *ctx = data;
 
 	if (ctx == NULL || ctx->sa == NULL) {
-		sfc_err(ctx->sa, "received NULL context or SFC adapter");
+		SFC_GENERIC_LOG(ERR, "received NULL context or SFC adapter");
 		return EINVAL;
 	}
 
-- 
2.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-12-11 17:56:25.536267800 +0800
+++ 0076-net-sfc-remove-null-dereference-in-log.patch	2023-12-11 17:56:23.087652300 +0800
@@ -1 +1 @@
-From d05ce802f39dd4a67c18f9dbe1a00901429ba191 Mon Sep 17 00:00:00 2001
+From 28f7dd30ee751f439839811ffa99395f6503ccb0 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit d05ce802f39dd4a67c18f9dbe1a00901429ba191 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index 1efe64a36a..6d57b2ba26 100644
+index 2ec743ebce..170ee57931 100644
@@ -23 +25 @@
-@@ -2070,7 +2070,7 @@ sfc_process_mport_journal_cb(void *data, efx_mport_desc_t *mport,
+@@ -2055,7 +2055,7 @@ sfc_process_mport_journal_cb(void *data, efx_mport_desc_t *mport,


More information about the stable mailing list