> -----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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to