diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2013-03-29 17:30:38 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-01 15:29:52 -0400 |
commit | 288fa3e022eb85fa151e0f9bcd15caeb81679af6 (patch) | |
tree | 18936a4994cce2e1a0c8a45577e45611077a9e45 /drivers/hv | |
parent | 945480b159aa0869bf5dadc07fdbae964882820b (diff) |
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>
Diffstat (limited to 'drivers/hv')
-rw-r--r-- | drivers/hv/ring_buffer.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hv/ring_buffer.c b/drivers/hv/ring_buffer.c index cafa72ffdc30..d6fbb5772b8d 100644 --- a/drivers/hv/ring_buffer.c +++ b/drivers/hv/ring_buffer.c | |||
@@ -71,6 +71,7 @@ u32 hv_end_read(struct hv_ring_buffer_info *rbi) | |||
71 | 71 | ||
72 | static bool hv_need_to_signal(u32 old_write, struct hv_ring_buffer_info *rbi) | 72 | static bool hv_need_to_signal(u32 old_write, struct hv_ring_buffer_info *rbi) |
73 | { | 73 | { |
74 | smp_mb(); | ||
74 | if (rbi->ring_buffer->interrupt_mask) | 75 | if (rbi->ring_buffer->interrupt_mask) |
75 | return false; | 76 | return false; |
76 | 77 | ||