summaryrefslogtreecommitdiff
path: root/drivers/hv/channel_mgmt.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-23 17:21:44 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-23 17:21:44 +0200
commit6fbf248a20d362a92de60beee9474faca0b54eee (patch)
treeb5365be73b420be3b6036fb40aaf1b167c90b180 /drivers/hv/channel_mgmt.c
parentde4ce2d1ad1bb3304d4107160c9551b7fd8d8ec5 (diff)
parentbb176f67090ca54869fc1262c913aa69d2ede070 (diff)
Merge 4.14-rc6 into char-misc-next
We want the driver fixes in here and this resolves a merge issue with the binder driver. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/channel_mgmt.c')
-rw-r--r--drivers/hv/channel_mgmt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index c942a1120cb9..a8dc9a164631 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -945,7 +945,10 @@ void vmbus_hvsock_device_unregister(struct vmbus_channel *channel)
{
BUG_ON(!is_hvsock_channel(channel));
- channel->rescind = true;
+ /* We always get a rescind msg when a connection is closed. */
+ while (!READ_ONCE(channel->probe_done) || !READ_ONCE(channel->rescind))
+ msleep(1);
+
vmbus_device_unregister(channel->device_obj);
}
EXPORT_SYMBOL_GPL(vmbus_hvsock_device_unregister);