1
0
Fork 0
alistair23-linux/drivers/hv
K. Y. Srinivasan 1db488d128 Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()
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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-30 14:05:44 -07:00
..
Kconfig x86: Make Linux guest support optional 2013-03-04 13:14:25 -08:00
Makefile Drivers: hv: util: introduce hv_utils_transport abstraction 2015-05-24 12:17:41 -07:00
channel.c Drivers: hv: vmbus: Give control over how the ring access is serialized 2016-02-07 21:34:12 -08:00
channel_mgmt.c Drivers: hv: vmbus: avoid unneeded compiler optimizations in vmbus_wait_for_unload() 2016-03-01 16:57:20 -08:00
connection.c Drivers: hv: vmbus: Support kexec on ws2012 r2 and above 2016-03-01 16:57:20 -08:00
hv.c Drivers: hv: vmbus: Support handling messages on multiple CPUs 2016-03-01 16:57:20 -08:00
hv_balloon.c Drivers: hv: balloon: Enable dynamic memory protocol negotiation with Windows 10 hosts 2015-08-04 22:28:39 -07:00
hv_fcopy.c Drivers: hv: util: Pass the channel information during the init call 2016-03-01 16:57:20 -08:00
hv_kvp.c Drivers: hv: util: Pass the channel information during the init call 2016-03-01 16:57:20 -08:00
hv_snapshot.c Drivers: hv: util: Pass the channel information during the init call 2016-03-01 16:57:20 -08:00
hv_util.c Drivers: hv: util: Pass the channel information during the init call 2016-03-01 16:57:20 -08:00
hv_utils_transport.c Drivers: hv: utils: Remove util transport handler from list if registration fails 2016-03-01 16:57:20 -08:00
hv_utils_transport.h Drivers: hv: utils: introduce HVUTIL_TRANSPORT_DESTROY mode 2015-12-14 19:27:30 -08:00
hyperv_vmbus.h Char/Misc patches for 4.6-rc1 2016-03-17 13:47:50 -07:00
ring_buffer.c Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read() 2016-04-30 14:05:44 -07:00
vmbus_drv.c Drivers: hv: vmbus: Support handling messages on multiple CPUs 2016-03-01 16:57:20 -08:00