From 997a0a47563c1d9316fe60a9f1dd79010ecc3a8a Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Wed, 6 Sep 2017 07:42:58 +0100 Subject: [PATCH] kernel: Add additional patch to 4.11 kernel This is required for LCOW, see: https://github.com/Microsoft/opengcs/pull/127/files#diff-6de848311cf35e3295214a8d10e3142cR62 Signed-off-by: Rolf Neugebauer (cherry picked from commit 38a2d57dc8d053b2db72eb69e88784ba6fe0a1bf) --- ...ools-build-Add-test-for-sched_getcpu.patch | 4 +- ...en-reset-onchannel_callback-on-error.patch | 4 +- ...tching-tasklet_enable-in-vmbus_close.patch | 4 +- ...to-error_clean_msglist-in-vmbus_open.patch | 4 +- ...y-enqueue-dequeue-a-channel-on-vmbus.patch | 4 +- ...ts-Hyper-V-transport-for-Virtual-Soc.patch | 4 +- ...nly-try-to-load-on-VMware-hypervisor.patch | 4 +- ...sock-add-the-support-of-auto-loading.patch | 4 +- ...09-tools-hv_sock-2-simple-test-cases.patch | 4 +- ...s-introduce-in-place-packet-iterator.patch | 4 +- ...ock-fix-a-race-in-hvs_stream_dequeue.patch | 4 +- ...ix-vsock_dequeue-enqueue_accept-race.patch | 4 +- ...rivers-hv-vmbus-Fix-rescind-handling.patch | 4 +- ...s-fix-hv_percpu_channel_deq-enq-race.patch | 4 +- ...d-vmbus-onoffer-onoffer_rescind-sync.patch | 4 +- ...ary-workaround-for-the-pending_send_.patch | 4 +- ...issed-signaling-in-hv_signal_on_read.patch | 4 +- ...id-double-FINs-if-shutdown-is-called.patch | 4 +- ...dded-vsock-transport-support-to-9pfs.patch | 4 +- ...ND_MIN_NAMESPACE_SIZE-from-4MB-to-4K.patch | 4 +- ...hv_sock-device-only-after-the-RESCIN.patch | 49 +++++++++++++++++++ 21 files changed, 89 insertions(+), 40 deletions(-) create mode 100644 kernel/patches-4.11.x/0021-vmbus-destroy-a-hv_sock-device-only-after-the-RESCIN.patch diff --git a/kernel/patches-4.11.x/0001-tools-build-Add-test-for-sched_getcpu.patch b/kernel/patches-4.11.x/0001-tools-build-Add-test-for-sched_getcpu.patch index 9e00fe908..9c61c26b7 100644 --- a/kernel/patches-4.11.x/0001-tools-build-Add-test-for-sched_getcpu.patch +++ b/kernel/patches-4.11.x/0001-tools-build-Add-test-for-sched_getcpu.patch @@ -1,7 +1,7 @@ From bb12a92eb84f7303cdf1be8133e59c1ebf50a62b Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Thu, 2 Mar 2017 12:55:49 -0300 -Subject: [PATCH 01/20] tools build: Add test for sched_getcpu() +Subject: [PATCH 01/21] tools build: Add test for sched_getcpu() Instead of trying to go on adding more ifdef conditions, do a feature test and define HAVE_SCHED_GETCPU_SUPPORT instead, then use it to @@ -145,5 +145,5 @@ index c74708da8571..b2cfa47990dc 100644 int is_printable_array(char *p, unsigned int len); -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0002-vmbus-vmbus_open-reset-onchannel_callback-on-error.patch b/kernel/patches-4.11.x/0002-vmbus-vmbus_open-reset-onchannel_callback-on-error.patch index 38590ca8c..a85e3d03b 100644 --- a/kernel/patches-4.11.x/0002-vmbus-vmbus_open-reset-onchannel_callback-on-error.patch +++ b/kernel/patches-4.11.x/0002-vmbus-vmbus_open-reset-onchannel_callback-on-error.patch @@ -1,7 +1,7 @@ From 3bd49e1e1ef7d5ae237d05a4f2198097c659f15d Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Fri, 5 May 2017 16:57:12 -0600 -Subject: [PATCH 02/20] vmbus: vmbus_open(): reset onchannel_callback on error +Subject: [PATCH 02/21] vmbus: vmbus_open(): reset onchannel_callback on error No real issue is observed without the patch, but let's add this just in case. @@ -30,5 +30,5 @@ index 321b8833fa6f..628d6fde1887 100644 } EXPORT_SYMBOL_GPL(vmbus_open); -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0003-vmbus-add-the-matching-tasklet_enable-in-vmbus_close.patch b/kernel/patches-4.11.x/0003-vmbus-add-the-matching-tasklet_enable-in-vmbus_close.patch index 920211363..4fe90f3c6 100644 --- a/kernel/patches-4.11.x/0003-vmbus-add-the-matching-tasklet_enable-in-vmbus_close.patch +++ b/kernel/patches-4.11.x/0003-vmbus-add-the-matching-tasklet_enable-in-vmbus_close.patch @@ -1,7 +1,7 @@ From 9a9a825baa57486c33d37425ee432e9b0c292b18 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Fri, 5 May 2017 16:57:15 -0600 -Subject: [PATCH 03/20] vmbus: add the matching tasklet_enable() in +Subject: [PATCH 03/21] vmbus: add the matching tasklet_enable() in vmbus_close_internal() If we disable a tasklet that is scheduled but hasn't started to run, @@ -38,5 +38,5 @@ index 628d6fde1887..7cd2bd9fd1f1 100644 } -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0004-vmbus-remove-goto-error_clean_msglist-in-vmbus_open.patch b/kernel/patches-4.11.x/0004-vmbus-remove-goto-error_clean_msglist-in-vmbus_open.patch index fd36729e5..103b777a0 100644 --- a/kernel/patches-4.11.x/0004-vmbus-remove-goto-error_clean_msglist-in-vmbus_open.patch +++ b/kernel/patches-4.11.x/0004-vmbus-remove-goto-error_clean_msglist-in-vmbus_open.patch @@ -1,7 +1,7 @@ From 6a5bc0225d5d1ba564aa1071bfd67ad3ce3799ad Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Fri, 5 May 2017 16:57:20 -0600 -Subject: [PATCH 04/20] vmbus: remove "goto error_clean_msglist" in +Subject: [PATCH 04/21] vmbus: remove "goto error_clean_msglist" in vmbus_open() This is just a cleanup patch to simplify the code a little. @@ -59,5 +59,5 @@ index 7cd2bd9fd1f1..db5e6f8730d2 100644 vmbus_teardown_gpadl(newchannel, newchannel->ringbuffer_gpadlhandle); kfree(open_info); -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0005-vmbus-dynamically-enqueue-dequeue-a-channel-on-vmbus.patch b/kernel/patches-4.11.x/0005-vmbus-dynamically-enqueue-dequeue-a-channel-on-vmbus.patch index 7dc27897b..d36784c68 100644 --- a/kernel/patches-4.11.x/0005-vmbus-dynamically-enqueue-dequeue-a-channel-on-vmbus.patch +++ b/kernel/patches-4.11.x/0005-vmbus-dynamically-enqueue-dequeue-a-channel-on-vmbus.patch @@ -1,7 +1,7 @@ From a585c8504fefc755a5f482e613fb81217bff35e0 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Fri, 5 May 2017 16:57:23 -0600 -Subject: [PATCH 05/20] vmbus: dynamically enqueue/dequeue a channel on +Subject: [PATCH 05/21] vmbus: dynamically enqueue/dequeue a channel on vmbus_open/close MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -185,5 +185,5 @@ index 970771a5f739..a8bae2caa69f 100644 void vmbus_setevent(struct vmbus_channel *channel); -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0006-hv_sock-implements-Hyper-V-transport-for-Virtual-Soc.patch b/kernel/patches-4.11.x/0006-hv_sock-implements-Hyper-V-transport-for-Virtual-Soc.patch index 26afc39bf..3f1f9cc83 100644 --- a/kernel/patches-4.11.x/0006-hv_sock-implements-Hyper-V-transport-for-Virtual-Soc.patch +++ b/kernel/patches-4.11.x/0006-hv_sock-implements-Hyper-V-transport-for-Virtual-Soc.patch @@ -1,7 +1,7 @@ From d4e96f82cbb40cde3ee6918f1e228ad1454b7757 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Fri, 5 May 2017 16:57:26 -0600 -Subject: [PATCH 06/20] hv_sock: implements Hyper-V transport for Virtual +Subject: [PATCH 06/21] hv_sock: implements Hyper-V transport for Virtual Sockets (AF_VSOCK) Hyper-V Sockets (hv_sock) supplies a byte-stream based communication @@ -930,5 +930,5 @@ index 000000000000..fd89bf357617 +MODULE_VERSION("1.0.0"); +MODULE_LICENSE("GPL"); -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0007-VMCI-only-try-to-load-on-VMware-hypervisor.patch b/kernel/patches-4.11.x/0007-VMCI-only-try-to-load-on-VMware-hypervisor.patch index faa18ec92..a89834b47 100644 --- a/kernel/patches-4.11.x/0007-VMCI-only-try-to-load-on-VMware-hypervisor.patch +++ b/kernel/patches-4.11.x/0007-VMCI-only-try-to-load-on-VMware-hypervisor.patch @@ -1,7 +1,7 @@ From 8c0a1dd39543ded436035c114379acdbc2b020ad Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Fri, 5 May 2017 16:57:29 -0600 -Subject: [PATCH 07/20] VMCI: only try to load on VMware hypervisor +Subject: [PATCH 07/21] VMCI: only try to load on VMware hypervisor Without the patch, vmw_vsock_vmci_transport.ko and vmw_vmci.ko can automatically load when an application creates an AF_VSOCK socket. @@ -60,5 +60,5 @@ index d7eaf1eb11e7..1789ea71ff5d 100644 if (vmci_err < VMCI_SUCCESS) { pr_err("Failed to initialize VMCIEvent (result=%d)\n", -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0008-hv_sock-add-the-support-of-auto-loading.patch b/kernel/patches-4.11.x/0008-hv_sock-add-the-support-of-auto-loading.patch index 28d475848..f39082c87 100644 --- a/kernel/patches-4.11.x/0008-hv_sock-add-the-support-of-auto-loading.patch +++ b/kernel/patches-4.11.x/0008-hv_sock-add-the-support-of-auto-loading.patch @@ -1,7 +1,7 @@ From a1b36bab8fc7abe0e0d246d29f8415e664839520 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Fri, 5 May 2017 16:57:35 -0600 -Subject: [PATCH 08/20] hv_sock: add the support of auto-loading +Subject: [PATCH 08/21] hv_sock: add the support of auto-loading After we disable VMWare virtual sockets driver's auto-loading on Hyper-V, we can enable hv_sock's auto-loading now. @@ -26,5 +26,5 @@ index fd89bf357617..f465b0b662df 100644 MODULE_LICENSE("GPL"); +MODULE_ALIAS_NETPROTO(PF_VSOCK); -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0009-tools-hv_sock-2-simple-test-cases.patch b/kernel/patches-4.11.x/0009-tools-hv_sock-2-simple-test-cases.patch index 5402cb2cd..7149c5ebf 100644 --- a/kernel/patches-4.11.x/0009-tools-hv_sock-2-simple-test-cases.patch +++ b/kernel/patches-4.11.x/0009-tools-hv_sock-2-simple-test-cases.patch @@ -1,7 +1,7 @@ From 80879b7b52cd2abd8731c3b34f6d5ea3cc4ad2d2 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Fri, 5 May 2017 18:52:02 -0600 -Subject: [PATCH 09/20] tools: hv_sock: 2 simple test cases. +Subject: [PATCH 09/21] tools: hv_sock: 2 simple test cases. Please read this document first: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service @@ -426,5 +426,5 @@ index 000000000000..fb4370c53152 + return -1; +} -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0010-vmbus-introduce-in-place-packet-iterator.patch b/kernel/patches-4.11.x/0010-vmbus-introduce-in-place-packet-iterator.patch index ed6fd913a..6bb3bdf6b 100644 --- a/kernel/patches-4.11.x/0010-vmbus-introduce-in-place-packet-iterator.patch +++ b/kernel/patches-4.11.x/0010-vmbus-introduce-in-place-packet-iterator.patch @@ -1,7 +1,7 @@ From fd279095dc63cec1b1aabb2fc7a1efe0c8c220d2 Mon Sep 17 00:00:00 2001 From: stephen hemminger Date: Mon, 27 Feb 2017 10:26:48 -0800 -Subject: [PATCH 10/20] vmbus: introduce in-place packet iterator +Subject: [PATCH 10/21] vmbus: introduce in-place packet iterator This is mostly just a refactoring of previous functions (get_pkt_next_raw, put_pkt_raw and commit_rd_index) to make it easier @@ -366,5 +366,5 @@ index a8bae2caa69f..ba93b7e4a972 100644 #endif /* _HYPERV_H */ -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0011-hvsock-fix-a-race-in-hvs_stream_dequeue.patch b/kernel/patches-4.11.x/0011-hvsock-fix-a-race-in-hvs_stream_dequeue.patch index db69653d6..be2765388 100644 --- a/kernel/patches-4.11.x/0011-hvsock-fix-a-race-in-hvs_stream_dequeue.patch +++ b/kernel/patches-4.11.x/0011-hvsock-fix-a-race-in-hvs_stream_dequeue.patch @@ -1,7 +1,7 @@ From 06e8641dae17f95f8358bd6ac206ba5d68c2d31f Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Tue, 16 May 2017 22:14:03 +0800 -Subject: [PATCH 11/20] hvsock: fix a race in hvs_stream_dequeue() +Subject: [PATCH 11/21] hvsock: fix a race in hvs_stream_dequeue() If hv_pkt_iter_next() returns a non-NULL pointer, we must update the recv_data_len/data_off info, otherwise the received data will @@ -109,5 +109,5 @@ index f465b0b662df..30154836acd0 100644 case 1: ret = 1; -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0012-hvsock-fix-vsock_dequeue-enqueue_accept-race.patch b/kernel/patches-4.11.x/0012-hvsock-fix-vsock_dequeue-enqueue_accept-race.patch index f869b90dd..2ac970375 100644 --- a/kernel/patches-4.11.x/0012-hvsock-fix-vsock_dequeue-enqueue_accept-race.patch +++ b/kernel/patches-4.11.x/0012-hvsock-fix-vsock_dequeue-enqueue_accept-race.patch @@ -1,7 +1,7 @@ From b9500355b558a265bcbf1256ed5bda639bec7688 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Fri, 19 May 2017 21:49:59 +0800 -Subject: [PATCH 12/20] hvsock: fix vsock_dequeue/enqueue_accept race +Subject: [PATCH 12/21] hvsock: fix vsock_dequeue/enqueue_accept race Signed-off-by: Dexuan Cui Origin: git@github.com:dcui/linux.git @@ -45,5 +45,5 @@ index 6f7f6757ceef..717db396f59e 100644 /* The caller will need a reference on the connected socket so we let * it call sock_put(). -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0013-Drivers-hv-vmbus-Fix-rescind-handling.patch b/kernel/patches-4.11.x/0013-Drivers-hv-vmbus-Fix-rescind-handling.patch index d3b48fb93..e844b675d 100644 --- a/kernel/patches-4.11.x/0013-Drivers-hv-vmbus-Fix-rescind-handling.patch +++ b/kernel/patches-4.11.x/0013-Drivers-hv-vmbus-Fix-rescind-handling.patch @@ -1,7 +1,7 @@ From a25d315ebedd8a3e18da1db4d95d06ea93136fa6 Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Sun, 30 Apr 2017 16:21:18 -0700 -Subject: [PATCH 13/20] Drivers: hv: vmbus: Fix rescind handling +Subject: [PATCH 13/21] Drivers: hv: vmbus: Fix rescind handling Fix the rescind handling. This patch addresses the following rescind scenario that is currently not handled correctly: @@ -286,5 +286,5 @@ index 8370b9dc6037..1024000af956 100644 entry->message_handler(hdr); -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0014-vmbus-fix-hv_percpu_channel_deq-enq-race.patch b/kernel/patches-4.11.x/0014-vmbus-fix-hv_percpu_channel_deq-enq-race.patch index aaa919c58..bf5d2ce7d 100644 --- a/kernel/patches-4.11.x/0014-vmbus-fix-hv_percpu_channel_deq-enq-race.patch +++ b/kernel/patches-4.11.x/0014-vmbus-fix-hv_percpu_channel_deq-enq-race.patch @@ -1,7 +1,7 @@ From 5a81156246d3fbb68c671eab68156260f2c58332 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Mon, 5 Jun 2017 16:13:18 +0800 -Subject: [PATCH 14/20] vmbus: fix hv_percpu_channel_deq/enq race +Subject: [PATCH 14/21] vmbus: fix hv_percpu_channel_deq/enq race Signed-off-by: Dexuan Cui Origin: git@github.com:dcui/linux.git @@ -242,5 +242,5 @@ index 1024000af956..be43e22ecd66 100644 * Register with the LDM. This will kick off the driver/device * binding...which will eventually call vmbus_match() and vmbus_probe() -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0015-vmbus-add-vmbus-onoffer-onoffer_rescind-sync.patch b/kernel/patches-4.11.x/0015-vmbus-add-vmbus-onoffer-onoffer_rescind-sync.patch index ff9212ece..e4c8d914b 100644 --- a/kernel/patches-4.11.x/0015-vmbus-add-vmbus-onoffer-onoffer_rescind-sync.patch +++ b/kernel/patches-4.11.x/0015-vmbus-add-vmbus-onoffer-onoffer_rescind-sync.patch @@ -1,7 +1,7 @@ From c4a8351a7b13a078bb3a8c9d3c9c9ccbebf6120e Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Mon, 5 Jun 2017 21:32:00 +0800 -Subject: [PATCH 15/20] vmbus: add vmbus onoffer/onoffer_rescind sync. +Subject: [PATCH 15/21] vmbus: add vmbus onoffer/onoffer_rescind sync. Signed-off-by: Dexuan Cui Origin: git@github.com:dcui/linux.git @@ -115,5 +115,5 @@ index be43e22ecd66..822daa0936c2 100644 vmbus_connection.work_queue, &context->work); -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0016-hv-sock-a-temporary-workaround-for-the-pending_send_.patch b/kernel/patches-4.11.x/0016-hv-sock-a-temporary-workaround-for-the-pending_send_.patch index 8da219dc1..9c7365b96 100644 --- a/kernel/patches-4.11.x/0016-hv-sock-a-temporary-workaround-for-the-pending_send_.patch +++ b/kernel/patches-4.11.x/0016-hv-sock-a-temporary-workaround-for-the-pending_send_.patch @@ -1,7 +1,7 @@ From c37cb78a5ceb29847b10914eed0df53434528e12 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Wed, 21 Jun 2017 22:30:42 +0800 -Subject: [PATCH 16/20] hv-sock: a temporary workaround for the +Subject: [PATCH 16/21] hv-sock: a temporary workaround for the pending_send_size issue While I'm trying to find out the root cause, I believe this can work @@ -129,5 +129,5 @@ index 30154836acd0..b8bf1446ae13 100644 return 0; } -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0017-vmbus-fix-the-missed-signaling-in-hv_signal_on_read.patch b/kernel/patches-4.11.x/0017-vmbus-fix-the-missed-signaling-in-hv_signal_on_read.patch index f9b2d45fa..b98538121 100644 --- a/kernel/patches-4.11.x/0017-vmbus-fix-the-missed-signaling-in-hv_signal_on_read.patch +++ b/kernel/patches-4.11.x/0017-vmbus-fix-the-missed-signaling-in-hv_signal_on_read.patch @@ -1,7 +1,7 @@ From ffadbd2c58fd82ada7d3722f767256f502f06b67 Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Wed, 28 Jun 2017 23:50:38 +0800 -Subject: [PATCH 17/20] vmbus: fix the missed signaling in hv_signal_on_read() +Subject: [PATCH 17/21] vmbus: fix the missed signaling in hv_signal_on_read() There is an off-by-one bug here, which can cause host-to-guest write to stall. @@ -37,5 +37,5 @@ index ba93b7e4a972..246bc6baf745 100644 return; -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0018-hv-sock-avoid-double-FINs-if-shutdown-is-called.patch b/kernel/patches-4.11.x/0018-hv-sock-avoid-double-FINs-if-shutdown-is-called.patch index b5511382e..92a55f4f4 100644 --- a/kernel/patches-4.11.x/0018-hv-sock-avoid-double-FINs-if-shutdown-is-called.patch +++ b/kernel/patches-4.11.x/0018-hv-sock-avoid-double-FINs-if-shutdown-is-called.patch @@ -1,7 +1,7 @@ From 24978998cc7847584de70d51741a314441c2f14f Mon Sep 17 00:00:00 2001 From: Dexuan Cui Date: Fri, 7 Jul 2017 09:15:29 +0800 -Subject: [PATCH 18/20] hv-sock: avoid double FINs if shutdown() is called +Subject: [PATCH 18/21] hv-sock: avoid double FINs if shutdown() is called The host expects a single FIN. @@ -37,5 +37,5 @@ index b8bf1446ae13..50e4bc822c69 100644 /* It can't fail: see hvs_channel_writable_bytes(). */ -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0019-Added-vsock-transport-support-to-9pfs.patch b/kernel/patches-4.11.x/0019-Added-vsock-transport-support-to-9pfs.patch index 999ae583c..d64a19fe3 100644 --- a/kernel/patches-4.11.x/0019-Added-vsock-transport-support-to-9pfs.patch +++ b/kernel/patches-4.11.x/0019-Added-vsock-transport-support-to-9pfs.patch @@ -1,7 +1,7 @@ From 50dd511f73c22341384c355105ebbd775d986fff Mon Sep 17 00:00:00 2001 From: Cheng-mean Liu Date: Tue, 11 Jul 2017 16:50:36 -0700 -Subject: [PATCH 19/20] Added vsock transport support to 9pfs +Subject: [PATCH 19/21] Added vsock transport support to 9pfs Signed-off-by: Cheng-mean Liu Origin: https://github.com/Microsoft/opengcs/blob/master/kernelconfig/4.11/patch_9pfs_vsock-transport.patch @@ -147,5 +147,5 @@ index 7bc2208b6cc4..dc34352145df 100644 + v9fs_unregister_trans(&p9_vsock_trans); } -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0020-NVDIMM-reducded-ND_MIN_NAMESPACE_SIZE-from-4MB-to-4K.patch b/kernel/patches-4.11.x/0020-NVDIMM-reducded-ND_MIN_NAMESPACE_SIZE-from-4MB-to-4K.patch index 0961b9e76..bb03f4059 100644 --- a/kernel/patches-4.11.x/0020-NVDIMM-reducded-ND_MIN_NAMESPACE_SIZE-from-4MB-to-4K.patch +++ b/kernel/patches-4.11.x/0020-NVDIMM-reducded-ND_MIN_NAMESPACE_SIZE-from-4MB-to-4K.patch @@ -1,7 +1,7 @@ From b3452a81e2e3be6bce0e71da7a87650024358862 Mon Sep 17 00:00:00 2001 From: Cheng-mean Liu Date: Tue, 11 Jul 2017 16:58:26 -0700 -Subject: [PATCH 20/20] NVDIMM: reducded ND_MIN_NAMESPACE_SIZE from 4MB to 4KB +Subject: [PATCH 20/21] NVDIMM: reducded ND_MIN_NAMESPACE_SIZE from 4MB to 4KB (page size) Signed-off-by: Cheng-mean Liu @@ -24,5 +24,5 @@ index ede5c6a62164..47760821c5b5 100644 enum ars_masks { -- -2.13.0 +2.11.1 diff --git a/kernel/patches-4.11.x/0021-vmbus-destroy-a-hv_sock-device-only-after-the-RESCIN.patch b/kernel/patches-4.11.x/0021-vmbus-destroy-a-hv_sock-device-only-after-the-RESCIN.patch new file mode 100644 index 000000000..ea98e1a05 --- /dev/null +++ b/kernel/patches-4.11.x/0021-vmbus-destroy-a-hv_sock-device-only-after-the-RESCIN.patch @@ -0,0 +1,49 @@ +From 433e6492a6249ea74a61ab41330e3c17d1c051fa Mon Sep 17 00:00:00 2001 +From: Dexuan Cui +Date: Tue, 29 Aug 2017 14:23:39 -0700 +Subject: [PATCH 21/21] vmbus: destroy a hv_sock device only after the + RESCIND_OFFER is received + +It looks the host/guest interactive protocol for hv_sock has been changed +since Windows Server TP5, and now Linux VM should only destroy the channel +after the host agrees: the host always sends a RESCIND_OFFER message to the +VM for this). + +Without the patch, the host's recv() can return -1 when Linux closes a +hv_sock connection, and as a result, the host app can potentially lose the +last portion of the data transferred through the hv_sock connection. + +Signed-off-by: Dexuan Cui +Origin: git@github.com:dcui/linux.git +(cherry picked from commit e37da6e7a52ea60825ca676e0c59fe5e4ecd89d6) +--- + drivers/hv/channel_mgmt.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c +index 52c7e811738f..a64819c0d4d9 100644 +--- a/drivers/hv/channel_mgmt.c ++++ b/drivers/hv/channel_mgmt.c +@@ -905,6 +905,9 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr) + if (channel->device_obj) { + if (channel->chn_rescind_callback) { + channel->chn_rescind_callback(channel); ++ ++ vmbus_device_unregister(channel->device_obj); ++ + return; + } + /* +@@ -955,9 +958,6 @@ void vmbus_hvsock_device_unregister(struct vmbus_channel *channel) + vmbus_connection.work_queue_rescind, &work); + flush_work(&work); + +- channel->rescind = true; +- vmbus_device_unregister(channel->device_obj); +- + /* Unblock the rescind handling */ + atomic_dec(&vmbus_connection.offer_in_progress); + } +-- +2.11.1 +