diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2011-06-06 15:49:52 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-07 13:45:55 -0700 |
commit | df2a4a711478f5fc28b3ac85f07e191591e31eb0 (patch) | |
tree | 35192a1b2bea260cf5e1c18a18615a44f72d6180 | |
parent | ef0d5b23022e207e9f367de52f4172daab3ac690 (diff) | |
download | op-kernel-dev-df2a4a711478f5fc28b3ac85f07e191591e31eb0.zip op-kernel-dev-df2a4a711478f5fc28b3ac85f07e191591e31eb0.tar.gz |
Staging: hv: vmbus: Introduce read dependency in hv_get_ringbuffer_availbytes()
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>
-rw-r--r-- | drivers/staging/hv/ring_buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/hv/ring_buffer.c b/drivers/staging/hv/ring_buffer.c index 932af1a..8b62553 100644 --- a/drivers/staging/hv/ring_buffer.c +++ b/drivers/staging/hv/ring_buffer.c @@ -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; |