patch 'net/netvsc: fix event callback leak on Rx filter failure' has been queued to stable release 24.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 19 23:02:38 CET 2026


Hi,

FYI, your patch has been queued to stable release 24.11.5

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/21/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/bluca/dpdk-stable

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

Thanks.

Luca Boccassi

---
>From c4b751987bec46a48d2f6f77aa698dcc3422a20c Mon Sep 17 00:00:00 2001
From: Long Li <longli at microsoft.com>
Date: Tue, 3 Mar 2026 12:54:07 -0800
Subject: [PATCH] net/netvsc: fix event callback leak on Rx filter failure

[ upstream commit 134ae1dc0e36d19d04f2288ffab71d1290b0579d ]

In hn_dev_start(), if hn_rndis_set_rxfilter() fails after registering
the device event callback, the function returns without unregistering
the callback. Unregister it before returning on error.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")

Signed-off-by: Long Li <longli at microsoft.com>
---
 drivers/net/netvsc/hn_ethdev.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 41274790e3..43b0911b90 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -1014,16 +1014,22 @@ hn_dev_start(struct rte_eth_dev *dev)
 				      NDIS_PACKET_TYPE_BROADCAST |
 				      NDIS_PACKET_TYPE_ALL_MULTICAST |
 				      NDIS_PACKET_TYPE_DIRECTED);
-	if (error)
+	if (error) {
+		rte_dev_event_callback_unregister(NULL,
+						  netvsc_hotadd_callback, hv);
 		return error;
+	}
 
 	error = hn_vf_start(dev);
-	if (error)
+	if (error) {
 		hn_rndis_set_rxfilter(hv, 0);
+		rte_dev_event_callback_unregister(NULL,
+						  netvsc_hotadd_callback, hv);
+		return error;
+	}
 
 	/* Initialize Link state */
-	if (error == 0)
-		hn_dev_link_update(dev, 0);
+	hn_dev_link_update(dev, 0);
 
 	for (i = 0; i < hv->num_queues; i++) {
 		dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STARTED;
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-19 22:00:49.455166764 +0000
+++ 0046-net-netvsc-fix-event-callback-leak-on-Rx-filter-fail.patch	2026-03-19 22:00:47.814359367 +0000
@@ -1 +1 @@
-From 134ae1dc0e36d19d04f2288ffab71d1290b0579d Mon Sep 17 00:00:00 2001
+From c4b751987bec46a48d2f6f77aa698dcc3422a20c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 134ae1dc0e36d19d04f2288ffab71d1290b0579d ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 0aa08de390..a6ed0356bc 100644
+index 41274790e3..43b0911b90 100644
@@ -22 +23 @@
-@@ -1072,16 +1072,22 @@ hn_dev_start(struct rte_eth_dev *dev)
+@@ -1014,16 +1014,22 @@ hn_dev_start(struct rte_eth_dev *dev)


More information about the stable mailing list