Skip to content

Commit

Permalink
Drivers: hv: vmbus: Fix a bug in hv_need_to_signal()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Apr 1, 2013
1 parent 945480b commit 288fa3e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/hv/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 288fa3e

Please sign in to comment.