]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Drivers: hv: util: Pass the channel information during the init call
authorK. Y. Srinivasan <kys@microsoft.com>
Fri, 26 Feb 2016 23:13:19 +0000 (15:13 -0800)
committerJack Vogel <jack.vogel@oracle.com>
Wed, 31 May 2017 02:49:21 +0000 (19:49 -0700)
commita6541a5f8db07f1520855ef08f49651a58dbffaa
treeb8f9f0aeaf41c75cd178c532ad043abf4b2b8060
parente16fe321eba46257fd86287f6d14ab5cfdd570d9
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>
Orabug: 25970637
(cherry picked from commit b9830d120cbe155863399f25eaef6aa8353e767f)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
drivers/hv/hv_fcopy.c
drivers/hv/hv_kvp.c
drivers/hv/hv_snapshot.c
drivers/hv/hv_util.c
include/linux/hyperv.h