summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2016-04-02 16:17:38 -0700
committerBen Hutchings <ben@decadent.org.uk>2016-06-15 21:29:29 +0100
commitdfc39542206c060e008f36060f13ea29a8e2783b (patch)
tree5c0e009be281990b9903767cc06ae72c6feac26d /include/linux
parentc84f51d79ae6ce03ad37966819a0b128cbf8649d (diff)
Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()
commit 1db488d12894f1936360779d6ab2aede3dd7f06a 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>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions