Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d452ab7b authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov Committed by Greg Kroah-Hartman
Browse files

Drivers: hv: vmbus: avoid unneeded compiler optimizations in vmbus_wait_for_unload()



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: default avatarRadim Krcmar <rkrcmar@redhat.com>
Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: default avatarRadim <Kr.má&lt;rkrcmar@redhat.com>
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0f70b669
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
		}