mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-08 01:09:37 +00:00
Series is at <1469716595-13591-1-git-send-email-stefanha@redhat.com>. This corresponds to v7 of the spec, posted in <1470324277-19300-1-git-send-email-stefanha@redhat.com> Also add a "cherry-picked from" to the "vsock: make listener child lock ordering explicit" patch and move it to the head of the series with the other vsock backports. Finally backport three new upstream fixes: 3fda5d6e5801 vhost/vsock: fix vhost virtio_vsock_pkt use-after-free 28ad55578b8a virtio-vsock: fix include guard typo 21bc54fc0cdc vhost/vsock: drop space available check for TX vq These were made on top of the version of the vsock patches which were added to Linux master in v4.8-rc1. This commit is based on the email posting, will replace with with proper cherry-pick separately. Requires corresponding backend changes in Hyperkit Signed-off-by: Ian Campbell <ian.campbell@docker.com>
40 lines
1.4 KiB
Diff
40 lines
1.4 KiB
Diff
From d7b1742f30b68fae9c0bd627704106f7665c30ed Mon Sep 17 00:00:00 2001
|
|
From: Vitaly Kuznetsov <vkuznets@redhat.com>
|
|
Date: Fri, 26 Feb 2016 15:13:18 -0800
|
|
Subject: [PATCH 38/45] Drivers: hv: vmbus: avoid unneeded compiler
|
|
optimizations in vmbus_wait_for_unload()
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Message header is modified by the hypervisor and we read it in a loop,
|
|
we need to prevent compilers from optimizing accesses. There are no such
|
|
optimizations at this moment, this is just a future proof.
|
|
|
|
Suggested-by: Radim Krcmar <rkrcmar@redhat.com>
|
|
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
|
|
Reviewed-by: Radim Kr.má<rkrcmar@redhat.com>
|
|
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
|
|
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
(cherry picked from commit d452ab7b4c65dfcaee88a0d6866eeeb98a3d1884)
|
|
---
|
|
drivers/hv/channel_mgmt.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
|
|
index f70e352..c892db5 100644
|
|
--- a/drivers/hv/channel_mgmt.c
|
|
+++ b/drivers/hv/channel_mgmt.c
|
|
@@ -605,7 +605,7 @@ static void vmbus_wait_for_unload(void)
|
|
bool unloaded = false;
|
|
|
|
while (1) {
|
|
- if (msg->header.message_type == HVMSG_NONE) {
|
|
+ if (READ_ONCE(msg->header.message_type) == HVMSG_NONE) {
|
|
mdelay(10);
|
|
continue;
|
|
}
|
|
--
|
|
2.9.3
|
|
|