Skip to content

Commit 33c150c

Browse files
dcuigregkh
authored andcommitted
vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister()
Due to commit 54a6626 ("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]>
1 parent 2460084 commit 33c150c

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/hv/channel_mgmt.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -936,14 +936,10 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr)
936936

937937
void vmbus_hvsock_device_unregister(struct vmbus_channel *channel)
938938
{
939-
mutex_lock(&vmbus_connection.channel_mutex);
940-
941939
BUG_ON(!is_hvsock_channel(channel));
942940

943941
channel->rescind = true;
944942
vmbus_device_unregister(channel->device_obj);
945-
946-
mutex_unlock(&vmbus_connection.channel_mutex);
947943
}
948944
EXPORT_SYMBOL_GPL(vmbus_hvsock_device_unregister);
949945

0 commit comments

Comments
 (0)