patch 'net/txgbe: fix null dereference in link alarm' has been queued to stable release 25.11.3

Kevin Traynor ktraynor at redhat.com
Thu Jul 30 11:16:17 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/04/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/534962a37382b85b37e38caad9ab91c890ba74d8

Thanks.

Kevin

---
>From 534962a37382b85b37e38caad9ab91c890ba74d8 Mon Sep 17 00:00:00 2001
From: Zaiyu Wang <zaiyuwang at trustnetic.com>
Date: Mon, 6 Jul 2026 18:47:18 +0800
Subject: [PATCH] net/txgbe: fix null dereference in link alarm

[ upstream commit a260cd540576039b56ea7b52908757b456facedd ]

Move the null pointer check for 'hw' to the beginning of
txgbe_dev_setup_link_alarm_handler_aml() before any dereference
operation.

Currently, 'hw' is dereferenced via hw->dev_back before the
if (!hw) check. This is a reverse NULL check (REVERSE_INULL)
that renders the null pointer validation ineffective and
introduces undefined behavior.

This check serves as a defensive measure against two scenarios:
1. The function is called with a NULL parameter.
2. During application exit, rte_eth_dev_release_port() frees
   the port private data (dev_private) while an alarm callback
   is still pending or being executed. In such cases, checking
   'hw' early helps prevent access to already freed memory.

Coverity issue: 504601
Fixes: 6104fd11086e ("net/txgbe: fix link stability for 25G NIC")

Signed-off-by: Zaiyu Wang <zaiyuwang at trustnetic.com>
---
 drivers/net/txgbe/txgbe_ethdev.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c
index 719583135b..927970034e 100644
--- a/drivers/net/txgbe/txgbe_ethdev.c
+++ b/drivers/net/txgbe/txgbe_ethdev.c
@@ -3265,4 +3265,8 @@ txgbe_dev_setup_link_alarm_handler_aml(void *param)
 {
 	struct txgbe_hw *hw = (struct txgbe_hw *)param;
+
+	if (!hw)
+		return;
+
 	struct rte_eth_dev *dev = (struct rte_eth_dev *)hw->dev_back;
 	struct txgbe_interrupt *intr = TXGBE_DEV_INTR(dev);
@@ -3271,7 +3275,4 @@ txgbe_dev_setup_link_alarm_handler_aml(void *param)
 	u32 gssr = hw->phy.phy_semaphore_mask;
 
-	if (!hw)
-		return;
-
 	speed = hw->phy.autoneg_advertised;
 	if (!speed)
-- 
2.55.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-07-30 10:16:02.614293014 +0100
+++ 0038-net-txgbe-fix-null-dereference-in-link-alarm.patch	2026-07-30 10:16:01.478990782 +0100
@@ -1 +1 @@
-From a260cd540576039b56ea7b52908757b456facedd Mon Sep 17 00:00:00 2001
+From 534962a37382b85b37e38caad9ab91c890ba74d8 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a260cd540576039b56ea7b52908757b456facedd ]
+
@@ -24 +25,0 @@
-Cc: stable at dpdk.org
@@ -32 +33 @@
-index 9a1cb448ad..4d2746371b 100644
+index 719583135b..927970034e 100644



More information about the stable mailing list