Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Reported-by: Olaf Hering <olh@suse.de>
Cc: Stable <stable@vger.kernel.org> (V3.8+)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

K. Y. Srinivasan and committed by
Greg Kroah-Hartman
288fa3e0 945480b1

+1
+1
drivers/hv/ring_buffer.c
··· 71 71 72 72 static bool hv_need_to_signal(u32 old_write, struct hv_ring_buffer_info *rbi) 73 73 { 74 + smp_mb(); 74 75 if (rbi->ring_buffer->interrupt_mask) 75 76 return false; 76 77