summaryrefslogtreecommitdiff
path: root/drivers/hv/hv_util.c
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-11-11 16:22:27 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-11-11 16:22:27 -0300
commit29f5b648fa0b31ad614c78468b9279e5fa96397a (patch)
tree385e76324c4e95e90b16889937e7c24e6f7d4f4a /drivers/hv/hv_util.c
parent1eae9639aac0f8de4d284f567ec722a822b52513 (diff)
Linux-libre 4.8.7-gnupck-4.8.7-gnu
Diffstat (limited to 'drivers/hv/hv_util.c')
-rw-r--r--drivers/hv/hv_util.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/hv/hv_util.c b/drivers/hv/hv_util.c
index d5acaa2d8..9dc637253 100644
--- a/drivers/hv/hv_util.c
+++ b/drivers/hv/hv_util.c
@@ -283,10 +283,14 @@ static void heartbeat_onchannelcallback(void *context)
u8 *hbeat_txf_buf = util_heartbeat.recv_buffer;
struct icmsg_negotiate *negop = NULL;
- vmbus_recvpacket(channel, hbeat_txf_buf,
- PAGE_SIZE, &recvlen, &requestid);
+ while (1) {
+
+ vmbus_recvpacket(channel, hbeat_txf_buf,
+ PAGE_SIZE, &recvlen, &requestid);
+
+ if (!recvlen)
+ break;
- if (recvlen > 0) {
icmsghdrp = (struct icmsg_hdr *)&hbeat_txf_buf[
sizeof(struct vmbuspipe_hdr)];