From: Stephen Hemminger <stephen@networkplumber.org>
To: kys@microsoft.com, decui@microsoft.com
Cc: devel@linuxdriverproject.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org,
Stephen Hemminger <sthemmin@microsoft.com>,
John Starks <jon.Starks@microsoft.com>
Subject: [PATCH] vmbus: fix missing signaling in hv_signal_on_read()
Date: Wed, 16 Aug 2017 08:49:46 -0700 [thread overview]
Message-ID: <20170816154946.7495-1-sthemmin@microsoft.com> (raw)
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>
---
This patch is for 4.13 (and stable).
A different fix is needed for linux-next.
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 e09fc8290c2f..080a0797c6f3 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -1515,11 +1515,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);
}
--
2.11.0
next reply other threads:[~2017-08-16 15:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 15:49 Stephen Hemminger [this message]
2017-08-16 16:10 ` [PATCH] vmbus: fix missing signaling in hv_signal_on_read() Greg KH
2017-08-16 16:16 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170816154946.7495-1-sthemmin@microsoft.com \
--to=stephen@networkplumber.org \
--cc=decui@microsoft.com \
--cc=devel@linuxdriverproject.org \
--cc=jon.Starks@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=sthemmin@microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox