summaryrefslogtreecommitdiff
path: root/drivers/xen/xen-scsiback.c
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2016-04-03 02:17:38 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-05-01 00:00:16 +0300
commita389fcfd2cb57793931a9fb98fed076aae50bb6c (patch)
tree91238d1cc9d66a0bb118ec910f9be75cbe05f865 /drivers/xen/xen-scsiback.c
parentbbca503b2ee000b5743a49c4995316cc499f44c6 (diff)
downloadlinux-a389fcfd2cb57793931a9fb98fed076aae50bb6c.tar.xz
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>
Diffstat (limited to 'drivers/xen/xen-scsiback.c')
0 files changed, 0 insertions, 0 deletions