summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/hv/hv_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/hv/hv_util.c')
-rw-r--r--kernel/drivers/hv/hv_util.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/drivers/hv/hv_util.c b/kernel/drivers/hv/hv_util.c
index 7994ec2e4..41f589622 100644
--- a/kernel/drivers/hv/hv_util.c
+++ b/kernel/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)];