lkml.org 
[lkml]   [2015]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 3/5] Drivers: hv_vmbus: Fix signal to host condition
Date
> -----Original Message-----
> From: deve On Behalf of K. Y. Srinivasan
> Sent: Monday, July 20, 2015 11:37
>
> From: Christopher Oo
>
> Fixes a bug where previously hv_ringbuffer_read would pass in the old
> number of bytes available to read instead of the expected old read index
> when calculating when to signal to the host that the ringbuffer is empty.
> Since the previous write size is already saved, also changes the
> hv_need_to_signal_on_read to use the previously read value rather than
> recalculating it.
>
> diff --git a/drivers/hv/ring_buffer.c b/drivers/hv/ring_buffer.c
> @@ -560,7 +552,7 @@ int hv_ringbuffer_read(struct hv_ring_buffer_info
> *inring_info, void *buffer,
>
> spin_unlock_irqrestore(&inring_info->ring_lock, flags);
>
> - *signal = hv_need_to_signal_on_read(old_read, inring_info);
> + *signal = hv_need_to_signal_on_read(bytes_avail_towrite, inring_info);
>
> return 0;
> }

Good catch!

-- Dexuan


\
 
 \ /
  Last update: 2015-07-20 14:01    [W:0.102 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site