diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2016-02-26 18:13:19 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-01 19:57:20 -0500 |
commit | b9830d120cbe155863399f25eaef6aa8353e767f (patch) | |
tree | 7aeea7c18f0ba6ac4c3b73658fc1c27db718fd17 /include/linux/hyperv.h | |
parent | d452ab7b4c65dfcaee88a0d6866eeeb98a3d1884 (diff) |
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 'include/linux/hyperv.h')
-rw-r--r-- | include/linux/hyperv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index d23dab0d770b..aa0fadce9308 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
@@ -1251,6 +1251,7 @@ u64 hv_do_hypercall(u64 control, void *input, void *output); | |||
1251 | 1251 | ||
1252 | struct hv_util_service { | 1252 | struct hv_util_service { |
1253 | u8 *recv_buffer; | 1253 | u8 *recv_buffer; |
1254 | void *channel; | ||
1254 | void (*util_cb)(void *); | 1255 | void (*util_cb)(void *); |
1255 | int (*util_init)(struct hv_util_service *); | 1256 | int (*util_init)(struct hv_util_service *); |
1256 | void (*util_deinit)(void); | 1257 | void (*util_deinit)(void); |