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

Shani Peretz shperetz at nvidia.com
Wed Apr 15 11:59:41 CEST 2026


Hi,

FYI, your patch has been queued to stable release 23.11.7

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

This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/83ce3f038ea536c4cf73b0024ea9c28be9451e1f

Thanks.

Shani

---
>From 83ce3f038ea536c4cf73b0024ea9c28be9451e1f 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 01b18d9fab..0594b27310 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -1039,16 +1039,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.43.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-04-14 14:44:32.726359298 +0300
+++ 0040-net-netvsc-fix-event-callback-leak-on-Rx-filter-fail.patch	2026-04-14 14:44:28.602477000 +0300
@@ -1 +1 @@
-From 134ae1dc0e36d19d04f2288ffab71d1290b0579d Mon Sep 17 00:00:00 2001
+From 83ce3f038ea536c4cf73b0024ea9c28be9451e1f 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 01b18d9fab..0594b27310 100644
@@ -22 +23 @@
-@@ -1072,16 +1072,22 @@ hn_dev_start(struct rte_eth_dev *dev)
+@@ -1039,16 +1039,22 @@ hn_dev_start(struct rte_eth_dev *dev)


More information about the stable mailing list