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

Commit 288fa3e0 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman
Browse files

Drivers: hv: vmbus: Fix a bug in hv_need_to_signal()



As part of updating the vmbus protocol, the function hv_need_to_signal()
was introduced. This functions helps optimize signalling from guest to
host. The newly added memory barrier is needed to ensure that we correctly
decide when to signal the host.

Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Reported-by: default avatarOlaf Hering <olh@suse.de>
Cc: Stable <stable@vger.kernel.org>  (V3.8+)
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 945480b1
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -71,6 +71,7 @@ u32 hv_end_read(struct hv_ring_buffer_info *rbi)


static bool hv_need_to_signal(u32 old_write, struct hv_ring_buffer_info *rbi)
static bool hv_need_to_signal(u32 old_write, struct hv_ring_buffer_info *rbi)
{
{
	smp_mb();
	if (rbi->ring_buffer->interrupt_mask)
	if (rbi->ring_buffer->interrupt_mask)
		return false;
		return false;