linux: properly update kernel patches to v4.4.14

When we updated from 4.4.10 to 4.4.14 we copied the patches over.
This changeset properly updates the patches so that they apply cleanly.
0039-VSOCK-do-not-disconnect-socket-when-peer-has-shutdow.patch was
removed as it made it into 4.4.14 already.

Compile tested only

For reference the patches were generated from:
https://github.com/rneugeba/linux-stable/tree/v4.4.14-moby

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
Rolf Neugebauer 2016-07-08 15:42:37 +01:00
parent 92ef135cd3
commit f829fef36b
41 changed files with 188 additions and 258 deletions

View File

@ -1,7 +1,7 @@
From 076de0d8086f75b10632476ad8f128095adde73c Mon Sep 17 00:00:00 2001 From 6fb5c9da4cb99e2ed0e031a7e29a0323ecd3d46f Mon Sep 17 00:00:00 2001
From: Stefan Hajnoczi <stefanha@redhat.com> From: Stefan Hajnoczi <stefanha@redhat.com>
Date: Thu, 17 Dec 2015 16:53:43 +0800 Date: Thu, 17 Dec 2015 16:53:43 +0800
Subject: [PATCH 01/41] virtio: make find_vqs() checkpatch.pl-friendly Subject: [PATCH 01/40] virtio: make find_vqs() checkpatch.pl-friendly
checkpatch.pl wants arrays of strings declared as follows: checkpatch.pl wants arrays of strings declared as follows:
@ -215,5 +215,5 @@ index e5ce8ab..6e6cb0c 100644
u64 (*get_features)(struct virtio_device *vdev); u64 (*get_features)(struct virtio_device *vdev);
int (*finalize_features)(struct virtio_device *vdev); int (*finalize_features)(struct virtio_device *vdev);
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 2155678736173e6ad2f5f5ec9ce4a49cf689457c Mon Sep 17 00:00:00 2001 From bd24912a81b0c3a24040f128c3bc9b88f5320afe Mon Sep 17 00:00:00 2001
From: Julia Lawall <julia.lawall@lip6.fr> From: Julia Lawall <julia.lawall@lip6.fr>
Date: Sat, 21 Nov 2015 18:39:17 +0100 Date: Sat, 21 Nov 2015 18:39:17 +0100
Subject: [PATCH 02/41] VSOCK: constify vmci_transport_notify_ops structures Subject: [PATCH 02/40] VSOCK: constify vmci_transport_notify_ops structures
The vmci_transport_notify_ops structures are never modified, so declare The vmci_transport_notify_ops structures are never modified, so declare
them as const. them as const.
@ -73,5 +73,5 @@ index dc9c792..21e591d 100644
vmci_transport_notify_pkt_socket_destruct, vmci_transport_notify_pkt_socket_destruct,
vmci_transport_notify_pkt_poll_in, vmci_transport_notify_pkt_poll_in,
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 9d5b17e645e9ccddfc2a6ab112ae69739da32ae6 Mon Sep 17 00:00:00 2001 From 5fa2db5aea3896f3c09e76cd1f6b60233a09237b Mon Sep 17 00:00:00 2001
From: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com> From: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Date: Tue, 22 Mar 2016 17:05:52 +0100 Date: Tue, 22 Mar 2016 17:05:52 +0100
Subject: [PATCH 03/41] AF_VSOCK: Shrink the area influenced by prepare_to_wait Subject: [PATCH 03/40] AF_VSOCK: Shrink the area influenced by prepare_to_wait
When a thread is prepared for waiting by calling prepare_to_wait, sleeping When a thread is prepared for waiting by calling prepare_to_wait, sleeping
is not allowed until either the wait has taken place or finish_wait has is not allowed until either the wait has taken place or finish_wait has
@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
1 file changed, 85 insertions(+), 73 deletions(-) 1 file changed, 85 insertions(+), 73 deletions(-)
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 7fd1220..3dce53e 100644 index 9b5bd6d..b5f1221 100644
--- a/net/vmw_vsock/af_vsock.c --- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c
@@ -1209,10 +1209,14 @@ static int vsock_stream_connect(struct socket *sock, struct sockaddr *addr, @@ -1209,10 +1209,14 @@ static int vsock_stream_connect(struct socket *sock, struct sockaddr *addr,
@ -322,9 +322,9 @@ index 7fd1220..3dce53e 100644
} }
} }
@@ -1816,8 +1830,6 @@ vsock_stream_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, @@ -1797,8 +1811,6 @@ vsock_stream_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
if (copied > 0)
err = copied; err = copied;
}
-out_wait: -out_wait:
- finish_wait(sk_sleep(sk), &wait); - finish_wait(sk_sleep(sk), &wait);
@ -332,5 +332,5 @@ index 7fd1220..3dce53e 100644
release_sock(sk); release_sock(sk);
return err; return err;
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 17665d95bdc4e922e45e5d7abca3de9b0b65e1f9 Mon Sep 17 00:00:00 2001 From b91a596f3b7dc3cc9f9f37a190f6362ed2c5617d Mon Sep 17 00:00:00 2001
From: Stefan Hajnoczi <stefanha@redhat.com> From: Stefan Hajnoczi <stefanha@redhat.com>
Date: Thu, 17 Dec 2015 11:10:21 +0800 Date: Thu, 17 Dec 2015 11:10:21 +0800
Subject: [PATCH 04/41] VSOCK: transport-specific vsock_transport functions Subject: [PATCH 04/40] VSOCK: transport-specific vsock_transport functions
struct vsock_transport contains function pointers called by AF_VSOCK struct vsock_transport contains function pointers called by AF_VSOCK
core code. The transport may want its own transport-specific function core code. The transport may want its own transport-specific function
@ -34,10 +34,10 @@ index e9eb2d6..23f5525 100644
void vsock_release_pending(struct sock *pending); void vsock_release_pending(struct sock *pending);
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 3dce53e..112fa8b 100644 index b5f1221..15f9595 100644
--- a/net/vmw_vsock/af_vsock.c --- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c
@@ -2006,6 +2006,15 @@ void vsock_core_exit(void) @@ -1987,6 +1987,15 @@ void vsock_core_exit(void)
} }
EXPORT_SYMBOL_GPL(vsock_core_exit); EXPORT_SYMBOL_GPL(vsock_core_exit);
@ -54,5 +54,5 @@ index 3dce53e..112fa8b 100644
MODULE_DESCRIPTION("VMware Virtual Socket Family"); MODULE_DESCRIPTION("VMware Virtual Socket Family");
MODULE_VERSION("1.0.1.0-k"); MODULE_VERSION("1.0.1.0-k");
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 6d9a53a79d1794f8863c6ed37c290c3bf04ef931 Mon Sep 17 00:00:00 2001 From b1fac60b2921b7478859a021a438daeee40a1848 Mon Sep 17 00:00:00 2001
From: Asias He <asias@redhat.com> From: Asias He <asias@redhat.com>
Date: Thu, 13 Jun 2013 18:27:00 +0800 Date: Thu, 13 Jun 2013 18:27:00 +0800
Subject: [PATCH 05/41] VSOCK: Introduce virtio_vsock_common.ko Subject: [PATCH 05/40] VSOCK: Introduce virtio_vsock_common.ko
This module contains the common code and header files for the following This module contains the common code and header files for the following
virtio_transporto and vhost_vsock kernel modules. virtio_transporto and vhost_vsock kernel modules.
@ -1321,5 +1321,5 @@ index 0000000..5b9e202
+MODULE_AUTHOR("Asias He"); +MODULE_AUTHOR("Asias He");
+MODULE_DESCRIPTION("common code for virtio vsock"); +MODULE_DESCRIPTION("common code for virtio vsock");
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From edffb28d3dc83885096529fbe0e7cd720d58be8e Mon Sep 17 00:00:00 2001 From 3cbea7cc3428b64f63aec6447bd9b727876bf075 Mon Sep 17 00:00:00 2001
From: Asias He <asias@redhat.com> From: Asias He <asias@redhat.com>
Date: Thu, 13 Jun 2013 18:28:48 +0800 Date: Thu, 13 Jun 2013 18:28:48 +0800
Subject: [PATCH 06/41] VSOCK: Introduce virtio_transport.ko Subject: [PATCH 06/40] VSOCK: Introduce virtio_transport.ko
VM sockets virtio transport implementation. This driver runs in the VM sockets virtio transport implementation. This driver runs in the
guest. guest.
@ -617,5 +617,5 @@ index 0000000..45472e0
+MODULE_DESCRIPTION("virtio transport for vsock"); +MODULE_DESCRIPTION("virtio transport for vsock");
+MODULE_DEVICE_TABLE(virtio, id_table); +MODULE_DEVICE_TABLE(virtio, id_table);
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 16f7572f518eafec12136aa081f4c35d6355f19b Mon Sep 17 00:00:00 2001 From a77fb1fd7d746dbb4ad454b3abb2f4fe251418ac Mon Sep 17 00:00:00 2001
From: Asias He <asias@redhat.com> From: Asias He <asias@redhat.com>
Date: Thu, 13 Jun 2013 18:29:21 +0800 Date: Thu, 13 Jun 2013 18:29:21 +0800
Subject: [PATCH 07/41] VSOCK: Introduce vhost_vsock.ko Subject: [PATCH 07/40] VSOCK: Introduce vhost_vsock.ko
VM sockets vhost transport implementation. This driver runs on the VM sockets vhost transport implementation. This driver runs on the
host. host.
@ -741,5 +741,5 @@ index 0000000..173f9fc
+#define VHOST_VSOCK_START _IO(VHOST_VIRTIO, 0x61) +#define VHOST_VSOCK_START _IO(VHOST_VIRTIO, 0x61)
+#endif +#endif
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From bc5ebf61ea082b6f7562bd43d9f343cc7edc491d Mon Sep 17 00:00:00 2001 From f7a03549f4cdd5fa352f6a0392d23f52efc5ecd4 Mon Sep 17 00:00:00 2001
From: Asias He <asias@redhat.com> From: Asias He <asias@redhat.com>
Date: Thu, 13 Jun 2013 18:30:19 +0800 Date: Thu, 13 Jun 2013 18:30:19 +0800
Subject: [PATCH 08/41] VSOCK: Add Makefile and Kconfig Subject: [PATCH 08/40] VSOCK: Add Makefile and Kconfig
Enable virtio-vsock and vhost-vsock. Enable virtio-vsock and vhost-vsock.
@ -94,5 +94,5 @@ index 2ce52d7..cf4c294 100644
vsock-y += af_vsock.o vsock_addr.o vsock-y += af_vsock.o vsock_addr.o
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 9024e2d916d191281c6deda22eed41c886f9120b Mon Sep 17 00:00:00 2001 From 91e1a920c69498f37aa1278b7faf970848ab613e Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@docker.com> From: Ian Campbell <ian.campbell@docker.com>
Date: Mon, 4 Apr 2016 14:50:10 +0100 Date: Mon, 4 Apr 2016 14:50:10 +0100
Subject: [PATCH 09/41] VSOCK: Only allow host network namespace to use Subject: [PATCH 09/40] VSOCK: Only allow host network namespace to use
AF_VSOCK. AF_VSOCK.
The VSOCK addressing schema does not really lend itself to simply creating an The VSOCK addressing schema does not really lend itself to simply creating an
@ -13,10 +13,10 @@ Signed-off-by: Ian Campbell <ian.campbell@docker.com>
1 file changed, 3 insertions(+) 1 file changed, 3 insertions(+)
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 112fa8b..ead5127 100644 index 15f9595..8373709 100644
--- a/net/vmw_vsock/af_vsock.c --- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c +++ b/net/vmw_vsock/af_vsock.c
@@ -1859,6 +1859,9 @@ static const struct proto_ops vsock_stream_ops = { @@ -1840,6 +1840,9 @@ static const struct proto_ops vsock_stream_ops = {
static int vsock_create(struct net *net, struct socket *sock, static int vsock_create(struct net *net, struct socket *sock,
int protocol, int kern) int protocol, int kern)
{ {
@ -27,5 +27,5 @@ index 112fa8b..ead5127 100644
return -EINVAL; return -EINVAL;
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 87b1f78685e31082a8b3844ab8a1500cd486fc98 Mon Sep 17 00:00:00 2001 From 2ee7848eba982cc94726d127ccc3823106e69fe5 Mon Sep 17 00:00:00 2001
From: Jake Oshins <jakeo@microsoft.com> From: Jake Oshins <jakeo@microsoft.com>
Date: Mon, 14 Dec 2015 16:01:41 -0800 Date: Mon, 14 Dec 2015 16:01:41 -0800
Subject: [PATCH 10/41] drivers:hv: Define the channel type for Hyper-V PCI Subject: [PATCH 10/40] drivers:hv: Define the channel type for Hyper-V PCI
Express pass-through Express pass-through
This defines the channel type for PCI front-ends in Hyper-V VMs. This defines the channel type for PCI front-ends in Hyper-V VMs.
@ -59,5 +59,5 @@ index ae6a711..10dda1e 100644
*/ */
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From acfa2b1d85d80d256f2e02bb03ee0107bd998c13 Mon Sep 17 00:00:00 2001 From 566d140d305b58578a5bdac86b3730fdfd3c8c8b Mon Sep 17 00:00:00 2001
From: "K. Y. Srinivasan" <kys@microsoft.com> From: "K. Y. Srinivasan" <kys@microsoft.com>
Date: Mon, 14 Dec 2015 16:01:43 -0800 Date: Mon, 14 Dec 2015 16:01:43 -0800
Subject: [PATCH 11/41] Drivers: hv: vmbus: Use uuid_le type consistently Subject: [PATCH 11/40] Drivers: hv: vmbus: Use uuid_le type consistently
Consistently use uuid_le type in the Hyper-V driver code. Consistently use uuid_le type in the Hyper-V driver code.
@ -293,5 +293,5 @@ index 5b96206..8adca44 100644
strcpy(alias, "vmbus:"); strcpy(alias, "vmbus:");
strcat(alias, guid_name); strcat(alias, guid_name);
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 3b6bcb030c01863b075ce19559e6134b77b09b8b Mon Sep 17 00:00:00 2001 From 96fd7fec2645d9a278e9532339176c3ac3c66ac1 Mon Sep 17 00:00:00 2001
From: "K. Y. Srinivasan" <kys@microsoft.com> From: "K. Y. Srinivasan" <kys@microsoft.com>
Date: Mon, 14 Dec 2015 16:01:44 -0800 Date: Mon, 14 Dec 2015 16:01:44 -0800
Subject: [PATCH 12/41] Drivers: hv: vmbus: Use uuid_le_cmp() for comparing Subject: [PATCH 12/40] Drivers: hv: vmbus: Use uuid_le_cmp() for comparing
GUIDs GUIDs
Use uuid_le_cmp() for comparing GUIDs. Use uuid_le_cmp() for comparing GUIDs.
@ -51,5 +51,5 @@ index e64934e..aa4d8cc 100644
return NULL; return NULL;
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From e843982a50538584d46295cdbccc584374dcfd6c Mon Sep 17 00:00:00 2001 From 7869027cfaa29640273828e7897d266e884d4515 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Mon, 14 Dec 2015 16:01:47 -0800 Date: Mon, 14 Dec 2015 16:01:47 -0800
Subject: [PATCH 13/41] Drivers: hv: vmbus: serialize process_chn_event() and Subject: [PATCH 13/40] Drivers: hv: vmbus: serialize process_chn_event() and
vmbus_close_internal() vmbus_close_internal()
process_chn_event(), running in the tasklet, can race with process_chn_event(), running in the tasklet, can race with
@ -83,5 +83,5 @@ index 9098f13..6a90c69 100644
} }
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From a5eb33883eff6c75ffe084674b7550d2a7bca2d2 Mon Sep 17 00:00:00 2001 From 82f9229226c6f3c6298832583e42d7721775ec34 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Mon, 14 Dec 2015 16:01:48 -0800 Date: Mon, 14 Dec 2015 16:01:48 -0800
Subject: [PATCH 14/41] Drivers: hv: vmbus: do sanity check of channel state in Subject: [PATCH 14/40] Drivers: hv: vmbus: do sanity check of channel state in
vmbus_close_internal() vmbus_close_internal()
This fixes an incorrect assumption of channel state in the function. This fixes an incorrect assumption of channel state in the function.
@ -38,5 +38,5 @@ index 6a90c69..b3c14ca 100644
channel->sc_creation_callback = NULL; channel->sc_creation_callback = NULL;
/* Stop callback and cancel the timer asap */ /* Stop callback and cancel the timer asap */
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From fe74981d0e068abb7502fc52dffdea5e89f89fc2 Mon Sep 17 00:00:00 2001 From 3df9ee5206a2e1b9698eb8785f5af8988d8be017 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Mon, 14 Dec 2015 16:01:49 -0800 Date: Mon, 14 Dec 2015 16:01:49 -0800
Subject: [PATCH 15/41] Drivers: hv: vmbus: fix rescind-offer handling for Subject: [PATCH 15/40] Drivers: hv: vmbus: fix rescind-offer handling for
device without a driver device without a driver
In the path vmbus_onoffer_rescind() -> vmbus_device_unregister() -> In the path vmbus_onoffer_rescind() -> vmbus_device_unregister() ->
@ -118,5 +118,5 @@ index aa4d8cc..5a71b2a 100644
} }
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 202e5b6d1aa80448d661657f3bf38ef1741ccd00 Mon Sep 17 00:00:00 2001 From e59d4119019c68491a438f45a38fb2768368893b Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Mon, 14 Dec 2015 16:01:50 -0800 Date: Mon, 14 Dec 2015 16:01:50 -0800
Subject: [PATCH 16/41] Drivers: hv: vmbus: release relid on error in Subject: [PATCH 16/40] Drivers: hv: vmbus: release relid on error in
vmbus_process_offer() vmbus_process_offer()
We want to simplify vmbus_onoffer_rescind() by not invoking We want to simplify vmbus_onoffer_rescind() by not invoking
@ -70,5 +70,5 @@ index 7903acc..9c9da3a 100644
} }
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 7b79c52f3e8d783b98915fc6066daf9c4394f929 Mon Sep 17 00:00:00 2001 From acf9f7fac136e7fe9c993b433ca8f66f6425b73d Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Mon, 14 Dec 2015 16:01:51 -0800 Date: Mon, 14 Dec 2015 16:01:51 -0800
Subject: [PATCH 17/41] Drivers: hv: vmbus: channge Subject: [PATCH 17/40] Drivers: hv: vmbus: channge
vmbus_connection.channel_lock to mutex vmbus_connection.channel_lock to mutex
spinlock is unnecessary here. spinlock is unnecessary here.
@ -112,5 +112,5 @@ index 3782636..d9937be 100644
struct workqueue_struct *work_queue; struct workqueue_struct *work_queue;
}; };
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 1f0c4d3c51b91e7efe8cda63ff471e5e20ce59a3 Mon Sep 17 00:00:00 2001 From 249964bb6c67d009fba9e64faf011a3766f5aad1 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com> From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Mon, 14 Dec 2015 19:02:00 -0800 Date: Mon, 14 Dec 2015 19:02:00 -0800
Subject: [PATCH 18/41] Drivers: hv: remove code duplication between Subject: [PATCH 18/40] Drivers: hv: remove code duplication between
vmbus_recvpacket()/vmbus_recvpacket_raw() vmbus_recvpacket()/vmbus_recvpacket_raw()
vmbus_recvpacket() and vmbus_recvpacket_raw() are almost identical but vmbus_recvpacket() and vmbus_recvpacket_raw() are almost identical but
@ -122,5 +122,5 @@ index 2889d97..dd6de7f 100644
} }
EXPORT_SYMBOL_GPL(vmbus_recvpacket_raw); EXPORT_SYMBOL_GPL(vmbus_recvpacket_raw);
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 9e1ad22e913564dac402f93eb2a1101d9e199758 Mon Sep 17 00:00:00 2001 From c5d50c1c2c15ae766d59e31c47946703ba22d0ed Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Mon, 21 Dec 2015 12:21:22 -0800 Date: Mon, 21 Dec 2015 12:21:22 -0800
Subject: [PATCH 19/41] Drivers: hv: vmbus: fix the building warning with Subject: [PATCH 19/40] Drivers: hv: vmbus: fix the building warning with
hyperv-keyboard hyperv-keyboard
With the recent change af3ff643ea91ba64dd8d0b1cbed54d44512f96cd With the recent change af3ff643ea91ba64dd8d0b1cbed54d44512f96cd
@ -68,5 +68,5 @@ index 4712d7d..9e2de6a 100644
*/ */
#define HV_VSS_GUID \ #define HV_VSS_GUID \
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 02adc9f995f59194291bde782062a2aa38201ab9 Mon Sep 17 00:00:00 2001 From e8d8f6bedfd812615dadf1c9ee02bcf8fe59bf79 Mon Sep 17 00:00:00 2001
From: "K. Y. Srinivasan" <kys@microsoft.com> From: "K. Y. Srinivasan" <kys@microsoft.com>
Date: Tue, 15 Dec 2015 16:27:27 -0800 Date: Tue, 15 Dec 2015 16:27:27 -0800
Subject: [PATCH 20/41] Drivers: hv: vmbus: Treat Fibre Channel devices as Subject: [PATCH 20/40] Drivers: hv: vmbus: Treat Fibre Channel devices as
performance critical performance critical
For performance critical devices, we distribute the incoming For performance critical devices, we distribute the incoming
@ -38,5 +38,5 @@ index d013171..1c1ad47 100644
{ HV_NIC_GUID, }, { HV_NIC_GUID, },
/* NetworkDirect Guest RDMA */ /* NetworkDirect Guest RDMA */
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 4607194c4f3d351c7967a03f6dd8a6590be10cab Mon Sep 17 00:00:00 2001 From b3b94cfe6d4b495e9a1351116f0648e3d20654c6 Mon Sep 17 00:00:00 2001
From: "K. Y. Srinivasan" <kys@microsoft.com> From: "K. Y. Srinivasan" <kys@microsoft.com>
Date: Fri, 25 Dec 2015 20:00:30 -0800 Date: Fri, 25 Dec 2015 20:00:30 -0800
Subject: [PATCH 21/41] Drivers: hv: vmbus: Add vendor and device atttributes Subject: [PATCH 21/40] Drivers: hv: vmbus: Add vendor and device atttributes
Add vendor and device attributes to VMBUS devices. These will be used Add vendor and device attributes to VMBUS devices. These will be used
by Hyper-V tools as well user-level RDMA libraries that will use the by Hyper-V tools as well user-level RDMA libraries that will use the
@ -351,5 +351,5 @@ index 9e2de6a..51c98fd 100644
struct device device; struct device device;
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 32a9ade9656d3ce93efd9e429eca714ccc90c53e Mon Sep 17 00:00:00 2001 From a72c960b2aaa4f2f7f94f563cbbd28c33a8eabd1 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com> From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Wed, 27 Jan 2016 22:29:34 -0800 Date: Wed, 27 Jan 2016 22:29:34 -0800
Subject: [PATCH 22/41] Drivers: hv: vmbus: avoid infinite loop in Subject: [PATCH 22/40] Drivers: hv: vmbus: avoid infinite loop in
init_vp_index() init_vp_index()
When we pick a CPU to use for a new subchannel we try find a non-used one When we pick a CPU to use for a new subchannel we try find a non-used one
@ -45,5 +45,5 @@ index 107d72f..af1d82e 100644
cur_cpu = cpumask_next(cur_cpu, &available_mask); cur_cpu = cpumask_next(cur_cpu, &available_mask);
if (cur_cpu >= nr_cpu_ids) { if (cur_cpu >= nr_cpu_ids) {
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From ddf2482b26c0381ab579ed3c4769249ea0f5aacb Mon Sep 17 00:00:00 2001 From 4a2cba4dc7b1292b70f07760f04b322bb37d4817 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com> From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Wed, 27 Jan 2016 22:29:35 -0800 Date: Wed, 27 Jan 2016 22:29:35 -0800
Subject: [PATCH 23/41] Drivers: hv: vmbus: avoid scheduling in interrupt Subject: [PATCH 23/40] Drivers: hv: vmbus: avoid scheduling in interrupt
context in vmbus_initiate_unload() context in vmbus_initiate_unload()
We have to call vmbus_initiate_unload() on crash to make kdump work but We have to call vmbus_initiate_unload() on crash to make kdump work but
@ -95,5 +95,5 @@ index af1d82e..d6c6114 100644
/* /*
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 6821345c611268ced9be1e9116ed3a5de98194bf Mon Sep 17 00:00:00 2001 From 99f9ed2fa0219e8d0725589dd3c9010955fcc067 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 27 Jan 2016 22:29:37 -0800 Date: Wed, 27 Jan 2016 22:29:37 -0800
Subject: [PATCH 24/41] Drivers: hv: vmbus: add a helper function to set a Subject: [PATCH 24/40] Drivers: hv: vmbus: add a helper function to set a
channel's pending send size channel's pending send size
This will be used by the coming net/hvsock driver. This will be used by the coming net/hvsock driver.
@ -32,5 +32,5 @@ index 51c98fd..934542a 100644
int vmbus_request_offers(void); int vmbus_request_offers(void);
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From f8302883a3723113f63e2361968f303cdcbcf0f9 Mon Sep 17 00:00:00 2001 From b0c86581b0be89a063c52f3d63d5583d46db649e Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 27 Jan 2016 22:29:38 -0800 Date: Wed, 27 Jan 2016 22:29:38 -0800
Subject: [PATCH 25/41] Drivers: hv: vmbus: define the new offer type for Subject: [PATCH 25/40] Drivers: hv: vmbus: define the new offer type for
Hyper-V socket (hvsock) Hyper-V socket (hvsock)
A helper function is also added. A helper function is also added.
@ -40,5 +40,5 @@ index 934542a..a4f105d 100644
enum hv_signal_policy policy) enum hv_signal_policy policy)
{ {
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 4023630c2a63f60d82ff894cfbfd0072c2f43f74 Mon Sep 17 00:00:00 2001 From 7aeced61892a30b5a71e202521cdaaa86fce18bd Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 27 Jan 2016 22:29:39 -0800 Date: Wed, 27 Jan 2016 22:29:39 -0800
Subject: [PATCH 26/41] Drivers: hv: vmbus: vmbus_sendpacket_ctl: hvsock: avoid Subject: [PATCH 26/40] Drivers: hv: vmbus: vmbus_sendpacket_ctl: hvsock: avoid
unnecessary signaling unnecessary signaling
When the hvsock channel's outbound ringbuffer is full (i.e., When the hvsock channel's outbound ringbuffer is full (i.e.,
@ -41,5 +41,5 @@ index dd6de7f..128dcf2 100644
return ret; return ret;
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From a43b42887324604cf976d6dde10d5e4b4d411a14 Mon Sep 17 00:00:00 2001 From d10104d080a6729dc8b644a6ad01262d8e42e3e4 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 27 Jan 2016 22:29:40 -0800 Date: Wed, 27 Jan 2016 22:29:40 -0800
Subject: [PATCH 27/41] Drivers: hv: vmbus: define a new VMBus message type for Subject: [PATCH 27/40] Drivers: hv: vmbus: define a new VMBus message type for
hvsock hvsock
A function to send the type of message is also added. A function to send the type of message is also added.
@ -97,5 +97,5 @@ index a4f105d..191bc5d 100644
+ const uuid_le *shv_host_servie_id); + const uuid_le *shv_host_servie_id);
#endif /* _HYPERV_H */ #endif /* _HYPERV_H */
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 7c82782252605f2cc287780166ee10442d10e978 Mon Sep 17 00:00:00 2001 From 72ea9d92422da277db8f890a355b06eb2d463b6e Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 27 Jan 2016 22:29:41 -0800 Date: Wed, 27 Jan 2016 22:29:41 -0800
Subject: [PATCH 28/41] Drivers: hv: vmbus: add a hvsock flag in struct Subject: [PATCH 28/40] Drivers: hv: vmbus: add a hvsock flag in struct
hv_driver hv_driver
Only the coming hv_sock driver has a "true" value for this flag. Only the coming hv_sock driver has a "true" value for this flag.
@ -60,5 +60,5 @@ index 191bc5d..05966e2 100644
uuid_le dev_type; uuid_le dev_type;
const struct hv_vmbus_device_id *id_table; const struct hv_vmbus_device_id *id_table;
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 844324cce7cf8caf3b86795637bd9afddfbbc390 Mon Sep 17 00:00:00 2001 From da0e563f0d84b1b9844192a316a24ea52492e106 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 27 Jan 2016 22:29:42 -0800 Date: Wed, 27 Jan 2016 22:29:42 -0800
Subject: [PATCH 29/41] Drivers: hv: vmbus: add a per-channel rescind callback Subject: [PATCH 29/40] Drivers: hv: vmbus: add a per-channel rescind callback
This will be used by the coming hv_sock driver. This will be used by the coming hv_sock driver.
@ -68,5 +68,5 @@ index 05966e2..ad04017 100644
* Retrieve the (sub) channel on which to send an outgoing request. * Retrieve the (sub) channel on which to send an outgoing request.
* When a primary channel has multiple sub-channels, we choose a * When a primary channel has multiple sub-channels, we choose a
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 0f2be5d95acaac8d4391c6f7918f77ada0885f48 Mon Sep 17 00:00:00 2001 From 91e2c0fba0da49bc3b18c6e3ca5194b259325f29 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 27 Jan 2016 22:29:43 -0800 Date: Wed, 27 Jan 2016 22:29:43 -0800
Subject: [PATCH 30/41] Drivers: hv: vmbus: add an API Subject: [PATCH 30/40] Drivers: hv: vmbus: add an API
vmbus_hvsock_device_unregister() vmbus_hvsock_device_unregister()
The hvsock driver needs this API to release all the resources related The hvsock driver needs this API to release all the resources related
@ -149,5 +149,5 @@ index ad04017..993318a 100644
resource_size_t min, resource_size_t max, resource_size_t min, resource_size_t max,
resource_size_t size, resource_size_t align, resource_size_t size, resource_size_t align,
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From c3244e29d0e58c3de56f23075ae22f9d47ba9d0f Mon Sep 17 00:00:00 2001 From 75183a2e296a6daa71d0cd2ff261124a80256610 Mon Sep 17 00:00:00 2001
From: "K. Y. Srinivasan" <kys@microsoft.com> From: "K. Y. Srinivasan" <kys@microsoft.com>
Date: Wed, 27 Jan 2016 22:29:45 -0800 Date: Wed, 27 Jan 2016 22:29:45 -0800
Subject: [PATCH 31/41] Drivers: hv: vmbus: Give control over how the ring Subject: [PATCH 31/40] Drivers: hv: vmbus: Give control over how the ring
access is serialized access is serialized
On the channel send side, many of the VMBUS On the channel send side, many of the VMBUS
@ -204,5 +204,5 @@ index 993318a..6c9695e 100644
{ {
return !!(c->offermsg.offer.chn_flags & return !!(c->offermsg.offer.chn_flags &
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 3269a14134d8c0ccc6e50e5336142e8f65226da2 Mon Sep 17 00:00:00 2001 From 1a7e1a3f3865aa1e9112b7c699f5feeb76da60d6 Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com> From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Fri, 26 Feb 2016 15:13:16 -0800 Date: Fri, 26 Feb 2016 15:13:16 -0800
Subject: [PATCH 32/41] Drivers: hv: vmbus: avoid wait_for_completion() on Subject: [PATCH 32/40] Drivers: hv: vmbus: avoid wait_for_completion() on
crash crash
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
@ -96,5 +96,5 @@ index d76a65f..45ea71e 100644
* In crash handler we can't schedule synic cleanup for all CPUs, * In crash handler we can't schedule synic cleanup for all CPUs,
* doing the cleanup for current CPU only. This should be sufficient * doing the cleanup for current CPU only. This should be sufficient
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 3d4dcde731d52d41491301a3430ea84324331b4e Mon Sep 17 00:00:00 2001 From 1fe930bcba521aebd15a78bbf151798ee48b367a Mon Sep 17 00:00:00 2001
From: Vitaly Kuznetsov <vkuznets@redhat.com> From: Vitaly Kuznetsov <vkuznets@redhat.com>
Date: Fri, 26 Feb 2016 15:13:18 -0800 Date: Fri, 26 Feb 2016 15:13:18 -0800
Subject: [PATCH 33/41] Drivers: hv: vmbus: avoid unneeded compiler Subject: [PATCH 33/40] Drivers: hv: vmbus: avoid unneeded compiler
optimizations in vmbus_wait_for_unload() optimizations in vmbus_wait_for_unload()
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
@ -35,5 +35,5 @@ index f70e352..c892db5 100644
continue; continue;
} }
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 92afb1396d3e35cf6b87248ded174db0c9699e1e Mon Sep 17 00:00:00 2001 From 66f17a83f539d5141cdedef8bc18aedc80927f0f Mon Sep 17 00:00:00 2001
From: Tom Herbert <tom@herbertland.com> From: Tom Herbert <tom@herbertland.com>
Date: Mon, 7 Mar 2016 14:11:06 -0800 Date: Mon, 7 Mar 2016 14:11:06 -0800
Subject: [PATCH 34/41] kcm: Kernel Connection Multiplexor module Subject: [PATCH 34/40] kcm: Kernel Connection Multiplexor module
This module implements the Kernel Connection Multiplexor. This module implements the Kernel Connection Multiplexor.
@ -2308,5 +2308,5 @@ index 0000000..649d246
+MODULE_LICENSE("GPL"); +MODULE_LICENSE("GPL");
+MODULE_ALIAS_NETPROTO(PF_KCM); +MODULE_ALIAS_NETPROTO(PF_KCM);
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From c6e4e04e17788c1fe4c9ba68f2c0ca52b0786be0 Mon Sep 17 00:00:00 2001 From ef50ff6678620d60f63adc48af658f0849f2e75b Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Mon, 21 Mar 2016 02:51:09 -0700 Date: Mon, 21 Mar 2016 02:51:09 -0700
Subject: [PATCH 35/41] net: add the AF_KCM entries to family name tables Subject: [PATCH 35/40] net: add the AF_KCM entries to family name tables
This is for the recent kcm driver, which introduces AF_KCM(41) in This is for the recent kcm driver, which introduces AF_KCM(41) in
b7ac4eb(kcm: Kernel Connection Multiplexor module). b7ac4eb(kcm: Kernel Connection Multiplexor module).
@ -48,5 +48,5 @@ index 0d91f7d..925def4 100644
/* /*
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From ef5406e1c37f0f3a2cfaf4be867639d5d882c3bb Mon Sep 17 00:00:00 2001 From 19a770426551eae942bdeeaf6ba22726d608dc32 Mon Sep 17 00:00:00 2001
From: Courtney Cavin <courtney.cavin@sonymobile.com> From: Courtney Cavin <courtney.cavin@sonymobile.com>
Date: Wed, 27 Apr 2016 12:13:03 -0700 Date: Wed, 27 Apr 2016 12:13:03 -0700
Subject: [PATCH 36/41] net: Add Qualcomm IPC router Subject: [PATCH 36/40] net: Add Qualcomm IPC router
Add an implementation of Qualcomm's IPC router protocol, used to Add an implementation of Qualcomm's IPC router protocol, used to
communicate with service providing remote processors. communicate with service providing remote processors.
@ -1303,5 +1303,5 @@ index 0000000..84ebce7
+MODULE_DESCRIPTION("Qualcomm IPC-Router SMD interface driver"); +MODULE_DESCRIPTION("Qualcomm IPC-Router SMD interface driver");
+MODULE_LICENSE("GPL v2"); +MODULE_LICENSE("GPL v2");
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 07e2f075c89ac3ec1dd2ac47078e1ea7b376ba88 Mon Sep 17 00:00:00 2001 From 44d8ced6db45835d3d823a43b0c3da2d13685390 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Sun, 15 May 2016 09:53:11 -0700 Date: Sun, 15 May 2016 09:53:11 -0700
Subject: [PATCH 37/41] hv_sock: introduce Hyper-V Sockets Subject: [PATCH 37/40] hv_sock: introduce Hyper-V Sockets
Hyper-V Sockets (hv_sock) supplies a byte-stream based communication Hyper-V Sockets (hv_sock) supplies a byte-stream based communication
mechanism between the host and the guest. It's somewhat like TCP over mechanism between the host and the guest. It's somewhat like TCP over
@ -1801,5 +1801,5 @@ index 0000000..b91bd60
+MODULE_DESCRIPTION("Hyper-V Sockets"); +MODULE_DESCRIPTION("Hyper-V Sockets");
+MODULE_LICENSE("Dual BSD/GPL"); +MODULE_LICENSE("Dual BSD/GPL");
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 5a28294f62717b7eca4d5a014ed43acef3d5667a Mon Sep 17 00:00:00 2001 From 4a96f8f688b9f36f5f6125af07a74197af68f933 Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Mon, 21 Mar 2016 02:53:08 -0700 Date: Mon, 21 Mar 2016 02:53:08 -0700
Subject: [PATCH 38/41] net: add the AF_HYPERV entries to family name tables Subject: [PATCH 38/40] net: add the AF_HYPERV entries to family name tables
This is for the hv_sock driver, which introduces AF_HYPERV(42). This is for the hv_sock driver, which introduces AF_HYPERV(42).
@ -45,5 +45,5 @@ index 925def4..323f7a3 100644
/* /*
-- --
2.8.2 2.9.0

View File

@ -1,7 +1,7 @@
From 6b78cb6d1a476bc91ad5a7f9754db29c4e566bc2 Mon Sep 17 00:00:00 2001 From 7d6a28adbe92368f865c6f9e95e5f7ab10ab6f8e Mon Sep 17 00:00:00 2001
From: Dexuan Cui <decui@microsoft.com> From: Dexuan Cui <decui@microsoft.com>
Date: Sat, 21 May 2016 16:55:50 +0800 Date: Sat, 21 May 2016 16:55:50 +0800
Subject: [PATCH 40/41] Drivers: hv: vmbus: fix the race when querying & Subject: [PATCH 39/40] Drivers: hv: vmbus: fix the race when querying &
updating the percpu list updating the percpu list
There is a rare race when we remove an entry from the global list There is a rare race when we remove an entry from the global list
@ -32,12 +32,12 @@ index 57a1b65..da76a2e 100644
--- a/drivers/hv/channel.c --- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c +++ b/drivers/hv/channel.c
@@ -592,6 +592,7 @@ static int vmbus_close_internal(struct vmbus_channel *channel) @@ -592,6 +592,7 @@ static int vmbus_close_internal(struct vmbus_channel *channel)
out: out:
tasklet_enable(tasklet); tasklet_enable(tasklet);
+ tasklet_schedule(tasklet); + tasklet_schedule(tasklet);
return ret; return ret;
} }
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index c892db5..0a54317 100644 index c892db5..0a54317 100644
@ -45,7 +45,7 @@ index c892db5..0a54317 100644
+++ b/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c
@@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h> #include <linux/kernel.h>
+#include <linux/interrupt.h> +#include <linux/interrupt.h>
#include <linux/sched.h> #include <linux/sched.h>
@ -53,81 +53,80 @@ index c892db5..0a54317 100644
#include <linux/mm.h> #include <linux/mm.h>
@@ -307,12 +308,13 @@ void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid) @@ -307,12 +308,13 @@ void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid)
{ {
unsigned long flags; unsigned long flags;
struct vmbus_channel *primary_channel; struct vmbus_channel *primary_channel;
- -
- vmbus_release_relid(relid); - vmbus_release_relid(relid);
+ struct tasklet_struct *tasklet; + struct tasklet_struct *tasklet;
BUG_ON(!channel->rescind); BUG_ON(!channel->rescind);
BUG_ON(!mutex_is_locked(&vmbus_connection.channel_mutex)); BUG_ON(!mutex_is_locked(&vmbus_connection.channel_mutex));
+ tasklet = hv_context.event_dpc[channel->target_cpu]; + tasklet = hv_context.event_dpc[channel->target_cpu];
+ tasklet_disable(tasklet); + tasklet_disable(tasklet);
if (channel->target_cpu != get_cpu()) { if (channel->target_cpu != get_cpu()) {
put_cpu(); put_cpu();
smp_call_function_single(channel->target_cpu, smp_call_function_single(channel->target_cpu,
@@ -321,6 +323,8 @@ void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid) @@ -321,6 +323,8 @@ void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid)
percpu_channel_deq(channel); percpu_channel_deq(channel);
put_cpu(); put_cpu();
} }
+ tasklet_enable(tasklet); + tasklet_enable(tasklet);
+ tasklet_schedule(tasklet); + tasklet_schedule(tasklet);
if (channel->primary_channel == NULL) { if (channel->primary_channel == NULL) {
list_del(&channel->listentry); list_del(&channel->listentry);
@@ -342,6 +346,8 @@ void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid) @@ -342,6 +346,8 @@ void hv_process_channel_removal(struct vmbus_channel *channel, u32 relid)
&primary_channel->alloced_cpus_in_node); &primary_channel->alloced_cpus_in_node);
free_channel(channel); free_channel(channel);
+ +
+ vmbus_release_relid(relid); + vmbus_release_relid(relid);
} }
void vmbus_free_channels(void) void vmbus_free_channels(void)
@@ -363,6 +369,7 @@ void vmbus_free_channels(void) @@ -363,6 +369,7 @@ void vmbus_free_channels(void)
*/ */
static void vmbus_process_offer(struct vmbus_channel *newchannel) static void vmbus_process_offer(struct vmbus_channel *newchannel)
{ {
+ struct tasklet_struct *tasklet; + struct tasklet_struct *tasklet;
struct vmbus_channel *channel; struct vmbus_channel *channel;
bool fnew = true; bool fnew = true;
unsigned long flags; unsigned long flags;
@@ -409,6 +416,8 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel) @@ -409,6 +416,8 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel)
init_vp_index(newchannel, dev_type); init_vp_index(newchannel, dev_type);
+ tasklet = hv_context.event_dpc[newchannel->target_cpu]; + tasklet = hv_context.event_dpc[newchannel->target_cpu];
+ tasklet_disable(tasklet); + tasklet_disable(tasklet);
if (newchannel->target_cpu != get_cpu()) { if (newchannel->target_cpu != get_cpu()) {
put_cpu(); put_cpu();
smp_call_function_single(newchannel->target_cpu, smp_call_function_single(newchannel->target_cpu,
@@ -418,6 +427,8 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel) @@ -418,6 +427,8 @@ static void vmbus_process_offer(struct vmbus_channel *newchannel)
percpu_channel_enq(newchannel); percpu_channel_enq(newchannel);
put_cpu(); put_cpu();
} }
+ tasklet_enable(tasklet); + tasklet_enable(tasklet);
+ tasklet_schedule(tasklet); + tasklet_schedule(tasklet);
/*
* This state is used to indicate a successful open
@@ -469,6 +480,7 @@ err_deq_chan:
list_del(&newchannel->listentry);
mutex_unlock(&vmbus_connection.channel_mutex);
+ tasklet_disable(tasklet);
if (newchannel->target_cpu != get_cpu()) {
put_cpu();
smp_call_function_single(newchannel->target_cpu,
@@ -477,6 +489,8 @@ err_deq_chan:
percpu_channel_deq(newchannel);
put_cpu();
}
+ tasklet_enable(tasklet);
+ tasklet_schedule(tasklet);
err_free_chan:
free_channel(newchannel);
--
2.8.2
/*
* This state is used to indicate a successful open
@@ -469,6 +480,7 @@ err_deq_chan:
list_del(&newchannel->listentry);
mutex_unlock(&vmbus_connection.channel_mutex);
+ tasklet_disable(tasklet);
if (newchannel->target_cpu != get_cpu()) {
put_cpu();
smp_call_function_single(newchannel->target_cpu,
@@ -477,6 +489,8 @@ err_deq_chan:
percpu_channel_deq(newchannel);
put_cpu();
}
+ tasklet_enable(tasklet);
+ tasklet_schedule(tasklet);
err_free_chan:
free_channel(newchannel);
--
2.9.0

View File

@ -1,68 +0,0 @@
From 248a6f77e4a373960892595a5ab500af8ce38343 Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@docker.com>
Date: Wed, 4 May 2016 14:21:53 +0100
Subject: [PATCH 39/41] VSOCK: do not disconnect socket when peer has shutdown
SEND only
The peer may be expecting a reply having sent a request and then done a
shutdown(SHUT_WR), so tearing down the whole socket at this point seems
wrong and breaks for me with a client which does a SHUT_WR.
Looking at other socket family's stream_recvmsg callbacks doing a shutdown
here does not seem to be the norm and removing it does not seem to have
had any adverse effects that I can see.
I'm using Stefan's RFC virtio transport patches, I'm unsure of the impact
on the vmci transport.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Cc: Andy King <acking@vmware.com>
Cc: Dmitry Torokhov <dtor@vmware.com>
Cc: Jorgen Hansen <jhansen@vmware.com>
Cc: Adit Ranadive <aditr@vmware.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit dedc58e067d8c379a15a8a183c5db318201295bb)
---
net/vmw_vsock/af_vsock.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index ead5127..8373709 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -1808,27 +1808,8 @@ vsock_stream_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
else if (sk->sk_shutdown & RCV_SHUTDOWN)
err = 0;
- if (copied > 0) {
- /* We only do these additional bookkeeping/notification steps
- * if we actually copied something out of the queue pair
- * instead of just peeking ahead.
- */
-
- if (!(flags & MSG_PEEK)) {
- /* If the other side has shutdown for sending and there
- * is nothing more to read, then modify the socket
- * state.
- */
- if (vsk->peer_shutdown & SEND_SHUTDOWN) {
- if (vsock_stream_has_data(vsk) <= 0) {
- sk->sk_state = SS_UNCONNECTED;
- sock_set_flag(sk, SOCK_DONE);
- sk->sk_state_change(sk);
- }
- }
- }
+ if (copied > 0)
err = copied;
- }
out:
release_sock(sk);
--
2.8.2

View File

@ -1,7 +1,7 @@
From 02e36dc741646dd93f2958378c87f22e6815a400 Mon Sep 17 00:00:00 2001 From 44b637acc82d2a81162a51aacdcd2110a3adeab8 Mon Sep 17 00:00:00 2001
From: Rolf Neugebauer <rolf.neugebauer@gmail.com> From: Rolf Neugebauer <rolf.neugebauer@gmail.com>
Date: Mon, 23 May 2016 18:55:45 +0100 Date: Mon, 23 May 2016 18:55:45 +0100
Subject: [PATCH 41/41] vmbus: Don't spam the logs with unknown GUIDs Subject: [PATCH 40/40] vmbus: Don't spam the logs with unknown GUIDs
With Hyper-V sockets device types are introduced on the fly. The pr_info() With Hyper-V sockets device types are introduced on the fly. The pr_info()
then prints a message on every connection, which is way too verbose. Since then prints a message on every connection, which is way too verbose. Since
@ -18,13 +18,12 @@ index 0a54317..120ee22 100644
--- a/drivers/hv/channel_mgmt.c --- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c
@@ -147,7 +147,6 @@ static u16 hv_get_dev_type(const uuid_le *guid) @@ -147,7 +147,6 @@ static u16 hv_get_dev_type(const uuid_le *guid)
if (!uuid_le_cmp(*guid, vmbus_devs[i].guid)) if (!uuid_le_cmp(*guid, vmbus_devs[i].guid))
return i; return i;
} }
- pr_info("Unknown GUID: %pUl\n", guid); - pr_info("Unknown GUID: %pUl\n", guid);
return i; return i;
} }
--
2.8.2
--
2.9.0