From df2a4a711478f5fc28b3ac85f07e191591e31eb0 Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Mon, 6 Jun 2011 15:49:52 -0700 Subject: [PATCH] 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 Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/ring_buffer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/hv/ring_buffer.c b/drivers/staging/hv/ring_buffer.c index 932af1a01a1e..8b625533fe43 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; -- 2.20.1