stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [linux-4.9.y only] vmbus: fix missing signaling in hv_signal_on_read()
@ 2017-10-19 18:07 Dexuan Cui
  2017-10-24 12:16 ` Patch "vmbus: fix missing signaling in hv_signal_on_read()" has been added to the 4.9-stable tree gregkh
  0 siblings, 1 reply; 2+ messages in thread
From: Dexuan Cui @ 2017-10-19 18:07 UTC (permalink / raw)
  To: gregkh@linuxfoundation.org, stable@vger.kernel.org
  Cc: KY Srinivasan, Stephen Hemminger, Stephen Hemminger


When the space available before start of reading (cached_write_sz)
is the same as the host required space (pending_sz), we need to
still signal host.

Fixes: 433e19cf33d3 ("Drivers: hv: vmbus: finally fix hv_need_to_signal_on_read()")

Signed-off-by: John Starks <jon.Starks@microsoft.com>
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---

Hi Greg, as we discussed, I'm resending this patch, and please only apply
it to linux-4.9.y (i.e. v4.9.57 as of today).

 include/linux/hyperv.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index d596a07..8cc99de 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -1521,11 +1521,11 @@ static inline  void hv_signal_on_read(struct vmbus_channel *channel)
 
 	cur_write_sz = hv_get_bytes_to_write(rbi);
 
-	if (cur_write_sz < pending_sz)
+	if (cur_write_sz <= pending_sz)
 		return;
 
 	cached_write_sz = hv_get_cached_bytes_to_write(rbi);
-	if (cached_write_sz < pending_sz)
+	if (cached_write_sz <= pending_sz)
 		vmbus_setevent(channel);
 
 	return;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-24 12:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-19 18:07 [PATCH] [linux-4.9.y only] vmbus: fix missing signaling in hv_signal_on_read() Dexuan Cui
2017-10-24 12:16 ` Patch "vmbus: fix missing signaling in hv_signal_on_read()" has been added to the 4.9-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).