aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDexuan Cui <[email protected]>2017-09-21 23:41:47 -0700
committerGreg Kroah-Hartman <[email protected]>2017-09-22 10:29:54 +0200
commit33c150c2ee4a65a59190a124b45d05b1abf9478e (patch)
tree1ef74e89bccee866cb126f68395ed4042cee1b8a
parent24600840c74112ad04a9ddd99d7d7f731dcaa1cb (diff)
vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister()
Due to commit 54a66265d675 ("Drivers: hv: vmbus: Fix rescind handling"), we need this patch to resolve the below deadlock: after we get the mutex in vmbus_hvsock_device_unregister() and call vmbus_device_unregister() -> device_unregister() -> ... -> device_release() -> vmbus_device_release(), we'll get a deadlock, because vmbus_device_release() tries to get the same mutex. Signed-off-by: Dexuan Cui <[email protected]> Cc: K. Y. Srinivasan <[email protected]> Cc: Haiyang Zhang <[email protected]> Cc: Stephen Hemminger <[email protected]> Signed-off-by: K. Y. Srinivasan <[email protected]> Cc: [email protected] (4.13 and above) Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/hv/channel_mgmt.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index 060df71c2e8b..bcbb031f7263 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -936,14 +936,10 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
void vmbus_hvsock_device_unregister(struct vmbus_channel *channel)
{
- mutex_lock(&vmbus_connection.channel_mutex);
-
BUG_ON(!is_hvsock_channel(channel));
channel->rescind = true;
vmbus_device_unregister(channel->device_obj);
-
- mutex_unlock(&vmbus_connection.channel_mutex);
}
EXPORT_SYMBOL_GPL(vmbus_hvsock_device_unregister);