patch 'net/netvsc: fix devargs memory leak on hotplug' has been queued to stable release 24.11.5

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

Thanks.

Luca Boccassi

---
>From 4713cdadd95db6413fdc8fc76f95c4be36cd086d Mon Sep 17 00:00:00 2001
From: Long Li <longli at microsoft.com>
Date: Thu, 26 Feb 2026 17:59:24 -0800
Subject: [PATCH] net/netvsc: fix devargs memory leak on hotplug

[ upstream commit fe2b03b6c950f29010f1abd694242747a4dc59e7 ]

Device arguments (devargs) allocated during VF hotplug were not being
freed when the hotplug context was cleaned up, causing a memory leak.

The devargs are allocated in netvsc_hotadd_callback() via
rte_devargs_parse() and stored in the hotadd context structure. They
must be freed with rte_devargs_reset() before freeing the context.

Free devargs in both cleanup paths:
- netvsc_hotplug_retry() after hotplug attempt completes
- hn_dev_close() when canceling pending hotplug operations

Fixes: 7fc4c0997b04 ("net/netvsc: fix hot adding multiple VF PCI devices")

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

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index c4c9d1a0a1..b0fc568b0d 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -654,6 +654,7 @@ free_hotadd_ctx:
 	LIST_REMOVE(hot_ctx, list);
 	rte_spinlock_unlock(&hv->hotadd_lock);
 
+	rte_devargs_reset(d);
 	rte_free(hot_ctx);
 }
 
@@ -1069,6 +1070,7 @@ hn_dev_close(struct rte_eth_dev *dev)
 		hot_ctx = LIST_FIRST(&hv->hotadd_list);
 		rte_eal_alarm_cancel(netvsc_hotplug_retry, hot_ctx);
 		LIST_REMOVE(hot_ctx, list);
+		rte_devargs_reset(&hot_ctx->da);
 		rte_free(hot_ctx);
 	}
 	rte_spinlock_unlock(&hv->hotadd_lock);
-- 
2.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-03-19 22:00:49.178519440 +0000
+++ 0038-net-netvsc-fix-devargs-memory-leak-on-hotplug.patch	2026-03-19 22:00:47.810359366 +0000
@@ -1 +1 @@
-From fe2b03b6c950f29010f1abd694242747a4dc59e7 Mon Sep 17 00:00:00 2001
+From 4713cdadd95db6413fdc8fc76f95c4be36cd086d Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit fe2b03b6c950f29010f1abd694242747a4dc59e7 ]
+
@@ -18 +19,0 @@
-Cc: stable at dpdk.org
@@ -26 +27 @@
-index 0142ff99bc..5b40985579 100644
+index c4c9d1a0a1..b0fc568b0d 100644
@@ -29 +30 @@
-@@ -712,6 +712,7 @@ free_hotadd_ctx:
+@@ -654,6 +654,7 @@ free_hotadd_ctx:
@@ -34 +35 @@
- 	free(hot_ctx);
+ 	rte_free(hot_ctx);
@@ -37 +38 @@
-@@ -1127,6 +1128,7 @@ hn_dev_close(struct rte_eth_dev *dev)
+@@ -1069,6 +1070,7 @@ hn_dev_close(struct rte_eth_dev *dev)
@@ -42 +43 @@
- 		free(hot_ctx);
+ 		rte_free(hot_ctx);


More information about the stable mailing list