[dpdk-stable] patch 'vhost: fix lock on device readiness notification' has been queued to stable release 20.11.3
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Mon Jul 26 15:52:47 CEST 2021
Hi,
FYI, your patch has been queued to stable release 20.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/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/e1b663f8b3632717ac6fbe0f1d188f0ceca28ffa
Thanks.
Luca Boccassi
---
>From e1b663f8b3632717ac6fbe0f1d188f0ceca28ffa Mon Sep 17 00:00:00 2001
From: Jiayu Hu <jiayu.hu at intel.com>
Date: Mon, 19 Jul 2021 11:00:45 -0400
Subject: [PATCH] vhost: fix lock on device readiness notification
[ upstream commit 7f31d4ea05ca80b58e3a3289c2a665071fb44a82 ]
The vhost notifies the application of device readiness via
vhost_user_notify_queue_state(), but calling this function
is not protected by the lock. This patch is to make this
function call lock protected.
Fixes: d0fcc38f5fa4 ("vhost: improve device readiness notifications")
Signed-off-by: Jiayu Hu <jiayu.hu at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
lib/librte_vhost/vhost_user.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
index 61ed221395..9b1a6d7697 100644
--- a/lib/librte_vhost/vhost_user.c
+++ b/lib/librte_vhost/vhost_user.c
@@ -2892,9 +2892,6 @@ skip_to_post_handle:
}
}
- if (unlock_required)
- vhost_user_unlock_all_queue_pairs(dev);
-
/* If message was not handled at this stage, treat it as an error */
if (!handled) {
VHOST_LOG_CONFIG(ERR,
@@ -2929,6 +2926,8 @@ skip_to_post_handle:
}
}
+ if (unlock_required)
+ vhost_user_unlock_all_queue_pairs(dev);
if (!virtio_is_ready(dev))
goto out;
--
2.30.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2021-07-26 13:53:17.094563335 +0100
+++ 0024-vhost-fix-lock-on-device-readiness-notification.patch 2021-07-26 13:53:15.845292538 +0100
@@ -1 +1 @@
-From 7f31d4ea05ca80b58e3a3289c2a665071fb44a82 Mon Sep 17 00:00:00 2001
+From e1b663f8b3632717ac6fbe0f1d188f0ceca28ffa Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 7f31d4ea05ca80b58e3a3289c2a665071fb44a82 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -17 +18 @@
- lib/vhost/vhost_user.c | 5 ++---
+ lib/librte_vhost/vhost_user.c | 5 ++---
@@ -20,5 +21,5 @@
-diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c
-index 031c578e54..31300e194f 100644
---- a/lib/vhost/vhost_user.c
-+++ b/lib/vhost/vhost_user.c
-@@ -2995,9 +2995,6 @@ skip_to_post_handle:
+diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c
+index 61ed221395..9b1a6d7697 100644
+--- a/lib/librte_vhost/vhost_user.c
++++ b/lib/librte_vhost/vhost_user.c
+@@ -2892,9 +2892,6 @@ skip_to_post_handle:
@@ -34 +35 @@
-@@ -3032,6 +3029,8 @@ skip_to_post_handle:
+@@ -2929,6 +2926,8 @@ skip_to_post_handle:
More information about the stable
mailing list