summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2016-02-26 15:13:19 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-20 09:52:38 +0200
commiteaee7976cf2af79c294ab41d651c0e52488ca868 (patch)
treedfc5bff12d6bea1be2ed1d25b4665899cf8cf20d /include
parentf91b8b1fd69c57764ffd404e33f565aa75357a1e (diff)
Drivers: hv: util: Pass the channel information during the init call
commit b9830d120cbe155863399f25eaef6aa8353e767f upstream. 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: Dexuan Cui <decui@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/hyperv.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index ae6a711dcd1d..281bb007f725 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -1179,6 +1179,7 @@ int vmbus_allocate_mmio(struct resource **new, struct hv_device *device_obj,
struct hv_util_service {
u8 *recv_buffer;
+ void *channel;
void (*util_cb)(void *);
int (*util_init)(struct hv_util_service *);
void (*util_deinit)(void);