Skip to contentSkip to conversation

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

PATCH New K. Y. Srinivasan 1 participant 1 message Mar 29, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Cc Stable <[email protected]> (V3.8+)
---
 drivers/hv/ring_buffer.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/hv/ring_buffer.c +1 -0
index cafa72f..d6fbb577 100644
@@ -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)
 {
+	smp_mb();
 	if (rbi->ring_buffer->interrupt_mask)
 		return false;
 
Signature · 1 line
1.7.4.1