patch 'net/netvsc: fix devargs memory leak on hotplug' has been queued to stable release 23.11.7
Shani Peretz
shperetz at nvidia.com
Wed Apr 15 11:59:33 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/7b21f0cabf907ab22398d150055144a6085b1651
Thanks.
Shani
---
>From 7b21f0cabf907ab22398d150055144a6085b1651 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 9189b227b6..fde1b91184 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -679,6 +679,7 @@ free_hotadd_ctx:
LIST_REMOVE(hot_ctx, list);
rte_spinlock_unlock(&hv->hotadd_lock);
+ rte_devargs_reset(d);
rte_free(hot_ctx);
}
@@ -1094,6 +1095,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.43.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-04-14 14:44:32.021940745 +0300
+++ 0032-net-netvsc-fix-devargs-memory-leak-on-hotplug.patch 2026-04-14 14:44:28.560508000 +0300
@@ -1 +1 @@
-From fe2b03b6c950f29010f1abd694242747a4dc59e7 Mon Sep 17 00:00:00 2001
+From 7b21f0cabf907ab22398d150055144a6085b1651 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 9189b227b6..fde1b91184 100644
@@ -29 +30 @@
-@@ -712,6 +712,7 @@ free_hotadd_ctx:
+@@ -679,6 +679,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)
+@@ -1094,6 +1095,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