]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister()
authorDexuan Cui <decui@microsoft.com>
Fri, 22 Sep 2017 06:41:47 +0000 (23:41 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2017 09:56:15 +0000 (11:56 +0200)
commitc8b235ab6a3d2818440537cb813cc10af540d28e
tree92f689c46c2908867bea1ee512a18aabcf60c443
parenteb5c1df09af8fd96480799b532e2c31eecfb5203
vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister()

commit 33c150c2ee4a65a59190a124b45d05b1abf9478e upstream.

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 <decui@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/channel_mgmt.c