1
0
Fork 0
remarkable-linux/drivers/hv
K. Y. Srinivasan c172113994 Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()
[ Upstream commit 1db488d128 ]

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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2016-05-17 13:42:54 -04: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
channel.c Drivers: hv: vmbus: Fix a siganlling host signalling issue 2015-03-25 11:53:55 +01:00
channel_mgmt.c hv: remove the per-channel workqueue 2015-04-03 16:18:02 +02:00
connection.c hv_vmbus: Add gradually increased delay for retries in vmbus_post_msg() 2015-04-03 16:18:02 +02:00
hv.c Drivers: hv: vmbus: Teardown clockevent devices on module unload 2015-03-01 19:30:07 -08:00
hv_balloon.c Drivers: hv: hv_balloon: correctly handle num_pages>INT_MAX case 2015-04-03 16:20:12 +02:00
hv_fcopy.c hv: hv_fcopy: drop the obsolete message on transfer failure 2015-01-25 09:17:58 -08:00
hv_kvp.c Drivers: hv: kvp,vss: Fast propagation of userspace communication failure 2014-11-26 19:00:32 -08:00
hv_snapshot.c Drivers: hv: kvp,vss: Fast propagation of userspace communication failure 2014-11-26 19:00:32 -08:00
hv_util.c Drivers: hv: util: On device remove, close the channel after de-initializing the service 2015-03-01 19:31:02 -08:00
hyperv_vmbus.h hv: don't schedule new works in vmbus_onoffer()/vmbus_onoffer_rescind() 2015-04-03 16:18:02 +02:00
ring_buffer.c Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read() 2016-05-17 13:42:54 -04:00
vmbus_drv.c hv: run non-blocking message handlers in the dispatch tasklet 2015-04-03 16:18:01 +02:00