aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv/hv_kvp.c
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2016-02-26 15:13:19 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-01 16:57:20 -0800
commitb9830d120cbe155863399f25eaef6aa8353e767f (patch)
tree7aeea7c18f0ba6ac4c3b73658fc1c27db718fd17 /drivers/hv/hv_kvp.c
parentDrivers: hv: vmbus: avoid unneeded compiler optimizations in vmbus_wait_for_unload() (diff)
downloadlinux-dev-b9830d120cbe155863399f25eaef6aa8353e767f.tar.xz
linux-dev-b9830d120cbe155863399f25eaef6aa8353e767f.zip
Drivers: hv: util: Pass the channel information during the init call
Pass the channel information to the util drivers that need to defer reading the channel while they are processing a request. This would address the following issue reported by Vitaly: Commit 3cace4a61610 ("Drivers: hv: utils: run polling callback always in interrupt context") removed direct *_transaction.state = HVUTIL_READY assignments from *_handle_handshake() functions introducing the following race: if a userspace daemon connects before we get first non-negotiation request from the server hv_poll_channel() won't set transaction state to HVUTIL_READY as (!channel) condition will fail, we set it to non-NULL on the first real request from the server. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reported-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/hv_kvp.c')
-rw-r--r--drivers/hv/hv_kvp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hv/hv_kvp.c b/drivers/hv/hv_kvp.c
index d4ab81bcd515..9b9b370fe22a 100644
--- a/drivers/hv/hv_kvp.c
+++ b/drivers/hv/hv_kvp.c
@@ -639,7 +639,6 @@ void hv_kvp_onchannelcallback(void *context)
*/
kvp_transaction.recv_len = recvlen;
- kvp_transaction.recv_channel = channel;
kvp_transaction.recv_req_id = requestid;
kvp_transaction.kvp_msg = kvp_msg;
@@ -688,6 +687,7 @@ int
hv_kvp_init(struct hv_util_service *srv)
{
recv_buffer = srv->recv_buffer;
+ kvp_transaction.recv_channel = srv->channel;
/*
* When this driver loads, the user level daemon that