RE: [PATCH 3/5] Drivers: hv_vmbus: Fix signal to host condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----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
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux