[dpdk-stable] patch 'net/virtio: fix repeated freeing of virtqueue' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:28:58 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

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

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/e0d08d0c032eb3b1006cb147177fe3702c81c4f2

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From e0d08d0c032eb3b1006cb147177fe3702c81c4f2 Mon Sep 17 00:00:00 2001
From: Gaoxiang Liu <liugaoxiang at huawei.com>
Date: Tue, 31 Aug 2021 22:39:51 +0800
Subject: [PATCH] net/virtio: fix repeated freeing of virtqueue
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 5d903aee8ad0243320a23d0e1e7b34b96024e007 ]

When virtio_init_queue returns error, the memory of vq is freed.
But the value of hw->vqs[queue_idx] does not restore.
If virtio_init_queue returns error, the memory of vq is freed again
in virtio_free_queues.

Fixes: 69c80d4ef89b ("net/virtio: allocate queue at init stage")

Signed-off-by: Gaoxiang Liu <liugaoxiang at huawei.com>
Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>
---
 drivers/net/virtio/virtio_ethdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index cfdeb40160..25f1b951f9 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -647,6 +647,7 @@ fail_q_alloc:
 	rte_memzone_free(hdr_mz);
 	rte_memzone_free(mz);
 	rte_free(vq);
+	hw->vqs[vtpci_queue_idx] = NULL;
 
 	return ret;
 }
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:04.502662683 +0800
+++ 0054-net-virtio-fix-repeated-freeing-of-virtqueue.patch	2021-11-10 14:17:01.807413276 +0800
@@ -1 +1 @@
-From 5d903aee8ad0243320a23d0e1e7b34b96024e007 Mon Sep 17 00:00:00 2001
+From e0d08d0c032eb3b1006cb147177fe3702c81c4f2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 5d903aee8ad0243320a23d0e1e7b34b96024e007 ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index 061d02f666..51fa85b078 100644
+index cfdeb40160..25f1b951f9 100644
@@ -24 +26,2 @@
-@@ -632,6 +632,7 @@ free_mz:
+@@ -647,6 +647,7 @@ fail_q_alloc:
+ 	rte_memzone_free(hdr_mz);
@@ -26 +28,0 @@
- free_vq:
@@ -28 +30 @@
-+	hw->vqs[queue_idx] = NULL;
++	hw->vqs[vtpci_queue_idx] = NULL;


More information about the stable mailing list