[dpdk-stable] patch 'net/virtio: fix interrupt handle leak' has been queued to stable release 19.11.10

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Tue Aug 10 17:40:14 CEST 2021


Hi,

FYI, your patch has been queued to stable release 19.11.10

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

This queued commit can be viewed at:
https://github.com/cpaelzer/dpdk-stable-queue/commit/a3b51a8b34b382717a2bab9681135b034ae872e0

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From a3b51a8b34b382717a2bab9681135b034ae872e0 Mon Sep 17 00:00:00 2001
From: Gaoxiang Liu <liugaoxiang at huawei.com>
Date: Mon, 26 Jul 2021 22:42:05 +0800
Subject: [PATCH] net/virtio: fix interrupt handle leak

[ upstream commit 7b9195154926b808e3ae23750eaff3e81cd5f529 ]

Free memory of interrupt handle in virtio_user_dev_uninit() to
avoid memory leak.
when virtio user dev closes, memory of interrupt handle is not freed
that is allocated in virtio_user_fill_intr_handle().

Fixes: 3d4fb6fd2505 ("net/virtio-user: support Rx interrupt")

Signed-off-by: Gaoxiang Liu <liugaoxiang at huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index ad5d2f3bf8..1277dbe038 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -528,6 +528,12 @@ void
 virtio_user_dev_uninit(struct virtio_user_dev *dev)
 {
 	uint32_t i;
+	struct rte_eth_dev *eth_dev = &rte_eth_devices[dev->hw.port_id];
+
+	if (eth_dev->intr_handle) {
+		free(eth_dev->intr_handle);
+		eth_dev->intr_handle = NULL;
+	}
 
 	virtio_user_stop_device(dev);
 
-- 
2.32.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-08-10 15:11:16.635100829 +0200
+++ 0094-net-virtio-fix-interrupt-handle-leak.patch	2021-08-10 15:11:13.126638878 +0200
@@ -1 +1 @@
-From 7b9195154926b808e3ae23750eaff3e81cd5f529 Mon Sep 17 00:00:00 2001
+From a3b51a8b34b382717a2bab9681135b034ae872e0 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7b9195154926b808e3ae23750eaff3e81cd5f529 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -18,2 +19,2 @@
- drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++++++
- 1 file changed, 7 insertions(+)
+ drivers/net/virtio/virtio_user/virtio_user_dev.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
@@ -22 +23 @@
-index 1cd1e95f45..16c58710d7 100644
+index ad5d2f3bf8..1277dbe038 100644
@@ -25,2 +26 @@
-@@ -654,6 +654,13 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
- void
+@@ -528,6 +528,12 @@ void
@@ -28,0 +29 @@
+ 	uint32_t i;
@@ -35 +36 @@
-+
+ 
@@ -38 +38,0 @@
- 	rte_mem_event_callback_unregister(VIRTIO_USER_MEM_EVENT_CLB_NAME, dev);


More information about the stable mailing list