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

Kevin Traynor ktraynor at redhat.com
Thu Nov 16 14:23:33 CET 2023


Hi,

FYI, your patch has been queued to stable release 21.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/21/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://github.com/kevintraynor/dpdk-stable

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

Thanks.

Kevin

---
>From c24098a7ad7be7d1418075b9fc712fcfe35a963d 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

[ 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 184f6e7c67..5059422ed3 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -2054,5 +2054,5 @@ sfc_process_mport_journal_cb(void *data, efx_mport_desc_t *mport,
 
 	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.41.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-11-16 13:21:53.758104530 +0000
+++ 0051-net-sfc-remove-null-dereference-in-log.patch	2023-11-16 13:21:52.516946567 +0000
@@ -1 +1 @@
-From d05ce802f39dd4a67c18f9dbe1a00901429ba191 Mon Sep 17 00:00:00 2001
+From c24098a7ad7be7d1418075b9fc712fcfe35a963d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit d05ce802f39dd4a67c18f9dbe1a00901429ba191 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 1efe64a36a..6d57b2ba26 100644
+index 184f6e7c67..5059422ed3 100644
@@ -23 +24 @@
-@@ -2071,5 +2071,5 @@ sfc_process_mport_journal_cb(void *data, efx_mport_desc_t *mport,
+@@ -2054,5 +2054,5 @@ sfc_process_mport_journal_cb(void *data, efx_mport_desc_t *mport,



More information about the stable mailing list