[dpdk-stable] patch 'net/virtio-user: fix run closing stdin and close callfd' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 5 12:16:13 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.1

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

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/c778b2b2480175f09d0c8fdf2addee4e8f470fe2

Thanks.

Luca Boccassi

---
>From c778b2b2480175f09d0c8fdf2addee4e8f470fe2 Mon Sep 17 00:00:00 2001
From: Jiawei Zhu <zhujiawei12 at huawei.com>
Date: Sat, 12 Dec 2020 00:53:18 +0800
Subject: [PATCH] net/virtio-user: fix run closing stdin and close callfd

[ upstream commit 97ed740c3498afab4162cb85492cd3109e21c604 ]

When i < VIRTIO_MAX_VIRTQUEUES and j == i,
dev->callfds[i] and dev->kickfds[i] are default 0.
So it will close(0), close the standard input (stdin).

And when the code fails in kickfd creation,
it will leaves one callfd not closed.

Fixes: e6e7ad8b3024 ("net/virtio-user: move eventfd open/close into init/uninit")
Cc: stable at dpdk.org:

Signed-off-by: Jiawei Zhu <zhujiawei12 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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c
index 053f0267ca..e1cbad0d90 100644
--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c
+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c
@@ -276,6 +276,7 @@ virtio_user_dev_init_notify(struct virtio_user_dev *dev)
 		}
 		kickfd = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
 		if (kickfd < 0) {
+			close(callfd);
 			PMD_DRV_LOG(ERR, "kickfd error, %s", strerror(errno));
 			break;
 		}
@@ -284,7 +285,7 @@ virtio_user_dev_init_notify(struct virtio_user_dev *dev)
 	}
 
 	if (i < VIRTIO_MAX_VIRTQUEUES) {
-		for (j = 0; j <= i; ++j) {
+		for (j = 0; j < i; ++j) {
 			close(dev->callfds[j]);
 			close(dev->kickfds[j]);
 		}
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:33.188307977 +0000
+++ 0087-net-virtio-user-fix-run-closing-stdin-and-close-call.patch	2021-02-05 11:18:28.934693549 +0000
@@ -1 +1 @@
-From 97ed740c3498afab4162cb85492cd3109e21c604 Mon Sep 17 00:00:00 2001
+From c778b2b2480175f09d0c8fdf2addee4e8f470fe2 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,2 @@
+
+[ upstream commit 97ed740c3498afab4162cb85492cd3109e21c604 ]


More information about the stable mailing list