summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2015-12-15 03:01:57 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-20 10:52:38 +0300
commitf91b8b1fd69c57764ffd404e33f565aa75357a1e (patch)
tree9e90da6884b8ca0d87c5d740c7e11c27379080e3
parent68a318670c663cac76ac359784d2f58d8d19cfc7 (diff)
downloadlinux-f91b8b1fd69c57764ffd404e33f565aa75357a1e.tar.xz
Drivers: hv: utils: Invoke the poll function after handshake
commit 2d0c3b5ad739697a68dc8a444f5b9f4817cf8f8f upstream. When the handshake with daemon is complete, we should poll the channel since during the handshake, we will not be processing any messages. This is a potential bug if the host is waiting for a response from the guest. I would like to thank Dexuan for pointing this out. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Dexuan Cui <decui@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/hv/hv_kvp.c2
-rw-r--r--drivers/hv/hv_snapshot.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c
index ce4d3a935491..b97ef3e094fd 100644
--- a/drivers/hv/hv_kvp.c
+++ b/drivers/hv/hv_kvp.c
@@ -155,7 +155,7 @@ static int kvp_handle_handshake(struct hv_kvp_msg *msg)
pr_debug("KVP: userspace daemon ver. %d registered\n",
KVP_OP_REGISTER);
kvp_register(dm_reg_value);
- kvp_transaction.state = HVUTIL_READY;
+ hv_poll_channel(kvp_transaction.recv_channel, kvp_poll_wrapper);
return 0;
}
diff --git a/drivers/hv/hv_snapshot.c b/drivers/hv/hv_snapshot.c
index faad79ae318a..c5fb249e34cc 100644
--- a/drivers/hv/hv_snapshot.c
+++ b/drivers/hv/hv_snapshot.c
@@ -114,7 +114,7 @@ static int vss_handle_handshake(struct hv_vss_msg *vss_msg)
default:
return -EINVAL;
}
- vss_transaction.state = HVUTIL_READY;
+ hv_poll_channel(vss_transaction.recv_channel, vss_poll_wrapper);
pr_debug("VSS: userspace daemon ver. %d registered\n", dm_reg_value);
return 0;
}