Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlaf Hering <ohering@suse.de>2017-10-20 12:20:33 +0200
committerOlaf Hering <ohering@suse.de>2017-10-20 12:23:29 +0200
commit5ba079b582036f115765a7a0b1f8e4c7efee2df3 (patch)
tree0b90b0b5f08d96d8f1d616da5b9eed5d29018206
parent798e32240f9caadd8e80f4935c3c6f3bfe4bf586 (diff)
vmbus: don't acquire the mutex in
vmbus_hvsock_device_unregister() (fate#323887).
-rw-r--r--patches.suse/msft-hv-1467-vmbus-don-t-acquire-the-mutex-in-vmbus_hvsock_device.patch45
-rw-r--r--series.conf1
2 files changed, 46 insertions, 0 deletions
diff --git a/patches.suse/msft-hv-1467-vmbus-don-t-acquire-the-mutex-in-vmbus_hvsock_device.patch b/patches.suse/msft-hv-1467-vmbus-don-t-acquire-the-mutex-in-vmbus_hvsock_device.patch
new file mode 100644
index 0000000000..9515e260cc
--- /dev/null
+++ b/patches.suse/msft-hv-1467-vmbus-don-t-acquire-the-mutex-in-vmbus_hvsock_device.patch
@@ -0,0 +1,45 @@
+From: Dexuan Cui <decui@microsoft.com>
+Date: Thu, 21 Sep 2017 23:41:47 -0700
+Patch-mainline: v4.14-rc4
+Subject: vmbus: don't acquire the mutex in vmbus_hvsock_device_unregister()
+Git-commit: 33c150c2ee4a65a59190a124b45d05b1abf9478e
+References: fate#323887
+
+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>
+Cc: stable@vger.kernel.org (4.13 and above)
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Acked-by: Olaf Hering <ohering@suse.de>
+---
+ drivers/hv/channel_mgmt.c | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
+--- 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);
+
diff --git a/series.conf b/series.conf
index 1e6e409ad2..c17cc23077 100644
--- a/series.conf
+++ b/series.conf
@@ -1714,6 +1714,7 @@
patches.suse/msft-hv-1464-x86-hyper-v-Remove-duplicated-HV_X64_EX_PROCESSOR_MA.patch
patches.suse/msft-hv-1465-netvsc-increase-default-receive-buffer-size.patch
patches.suse/msft-hv-1466-hv_netvsc-fix-send-buffer-failure-on-MTU-change.patch
+ patches.suse/msft-hv-1467-vmbus-don-t-acquire-the-mutex-in-vmbus_hvsock_device.patch
patches.suse/suse-hv-guest-os-id.patch
patches.suse/suse-hv-kvp_on_msg.dbg.patch