patch 'net/netvsc: fix subchannel leak on device removal' has been queued to stable release 24.11.5

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Mar 19 23:02:35 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/a17ac6b1fcfbde1f25df30249127bd2f9eb05976

Thanks.

Luca Boccassi

---
>From a17ac6b1fcfbde1f25df30249127bd2f9eb05976 Mon Sep 17 00:00:00 2001
From: Long Li <longli at microsoft.com>
Date: Tue, 3 Mar 2026 12:54:04 -0800
Subject: [PATCH] net/netvsc: fix subchannel leak on device removal

[ upstream commit cfd239bd7c5250f790b7fa4c0e7d8cd0a65ca808 ]

eth_hn_dev_uninit() only closes the primary channel but never
closes subchannels allocated during hn_dev_configure(). This
leaks VMBus subchannel resources on device removal.

Close all subchannels before closing the primary channel to
prevent resource leaks.

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

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

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index b0fc568b0d..81daf9bafb 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -1406,6 +1406,7 @@ eth_hn_dev_uninit(struct rte_eth_dev *eth_dev)
 {
 	struct hn_data *hv = eth_dev->data->dev_private;
 	int ret, ret_stop;
+	int i;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1420,6 +1421,15 @@ eth_hn_dev_uninit(struct rte_eth_dev *eth_dev)
 
 	hn_detach(hv);
 	hn_chim_uninit(eth_dev);
+
+	/* Close any subchannels before closing the primary channel */
+	for (i = 1; i < HN_MAX_CHANNELS; i++) {
+		if (hv->channels[i] != NULL) {
+			rte_vmbus_chan_close(hv->channels[i]);
+			hv->channels[i] = NULL;
+		}
+	}
+
 	rte_vmbus_chan_close(hv->channels[0]);
 	rte_free(hv->primary);
 	ret = rte_eth_dev_owner_delete(hv->owner.id);
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-19 22:00:49.350837891 +0000
+++ 0043-net-netvsc-fix-subchannel-leak-on-device-removal.patch	2026-03-19 22:00:47.814359367 +0000
@@ -1 +1 @@
-From cfd239bd7c5250f790b7fa4c0e7d8cd0a65ca808 Mon Sep 17 00:00:00 2001
+From a17ac6b1fcfbde1f25df30249127bd2f9eb05976 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cfd239bd7c5250f790b7fa4c0e7d8cd0a65ca808 ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index 5b40985579..354217479a 100644
+index b0fc568b0d..81daf9bafb 100644
@@ -25 +26 @@
-@@ -1464,6 +1464,7 @@ eth_hn_dev_uninit(struct rte_eth_dev *eth_dev)
+@@ -1406,6 +1406,7 @@ eth_hn_dev_uninit(struct rte_eth_dev *eth_dev)
@@ -33 +34 @@
-@@ -1475,6 +1476,15 @@ eth_hn_dev_uninit(struct rte_eth_dev *eth_dev)
+@@ -1420,6 +1421,15 @@ eth_hn_dev_uninit(struct rte_eth_dev *eth_dev)


More information about the stable mailing list