linux/drivers/hv
K. Y. Srinivasan dfc3954220 Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()
commit 1db488d128 upstream.

On the consumer side, we have interrupt driven flow management of the
producer. It is sufficient to base the signaling decision on the
amount of space that is available to write after the read is complete.
The current code samples the previous available space and uses this
in making the signaling decision. This state can be stale and is
unnecessary. Since the state can be stale, we end up not signaling
the host (when we should) and this can result in a hang. Fix this
problem by removing the unnecessary check. I would like to thank
Arseney Romanenko <arseneyr@microsoft.com> for pointing out this issue.

Also, issue a full memory barrier before making the signaling descision
to correctly deal with potential reordering of the write (read index)
followed by the read of pending_sz.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Tested-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2016-06-15 21:29:29 +01:00
..
channel.c Drivers: hv: vmbus: Fix a bug in the error path in vmbus_open() 2015-05-04 16:06:36 +01:00
channel_mgmt.c Drivers: hv: vmbus: Don't wait after requesting offers 2015-05-05 11:09:38 +01:00
connection.c Drivers: hv: vmbus: Cleanup vmbus_post_msg() 2014-10-30 09:40:12 -07:00
hv.c Drivers: hv: vmbus: Cleanup hv_post_message() 2014-10-30 09:40:13 -07:00
hv_balloon.c Drivers: hv: balloon: Ensure pressure reports are posted regularly 2014-05-03 19:25:17 -04:00
hv_fcopy.c Drivers: hv: hv_fcopy: fix a race condition for SMP guest 2014-07-17 18:43:10 -07:00
hv_kvp.c Drivers: hv: util: Fix a bug in the KVP code 2014-07-09 14:34:35 -07:00
hv_snapshot.c connector: add portid to unicast in addition to broadcasting 2014-02-07 15:40:17 -08:00
hv_util.c Drivers: hv: util: Fix a bug in the KVP code 2014-07-09 14:34:35 -07:00
hyperv_vmbus.h Drivers: hv: vmbus: Cleanup hv_post_message() 2014-10-30 09:40:13 -07:00
Kconfig x86: Make Linux guest support optional 2013-03-04 13:14:25 -08:00
Makefile Drivers: hv: Implement the file copy service 2014-02-18 10:53:48 -08:00
ring_buffer.c Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read() 2016-06-15 21:29:29 +01:00
vmbus_drv.c Drivers: hv: vmbus: prevent cpu offlining on newer hypervisors 2016-04-11 11:01:20 +01:00