Skip to content

Commit

Permalink
Drivers: hv: utils: Invoke the poll function after handshake
Browse files Browse the repository at this point in the history
commit 2d0c3b5 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>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Oct 20, 2018
1 parent 68a3186 commit f91b8b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/hv/hv_kvp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/hv/hv_snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f91b8b1

Please sign in to comment.