lkml.org 
[lkml]   [2011]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 28/49] Staging: hv: vmbus: Introduce read dependency in hv_get_ringbuffer_availbytes()
Date
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>
---
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;
--
1.7.4.1


\
 
 \ /
  Last update: 2011-06-07 00:45    [from the cache]
©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site