Skip to content

Commit

Permalink
Staging: hv: vmbus: Introduce read dependency in hv_get_ringbuffer_av…
Browse files Browse the repository at this point in the history
…ailbytes()

Introduce read dependency in hv_get_ringbuffer_availbytes().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Jun 7, 2011
1 parent ef0d5b2 commit df2a4a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/hv/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ hv_get_ringbuffer_availbytes(struct hv_ring_buffer_info *rbi,
{
u32 read_loc, write_loc;

smp_read_barrier_depends();

/* Capture the read/write indices before they changed */
read_loc = rbi->ring_buffer->read_index;
write_loc = rbi->ring_buffer->write_index;
Expand Down

0 comments on commit df2a4a7

Please sign in to comment.