]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.44/hv_netvsc-fix-net-device-attach-on-older-windows-hosts.patch
4.14-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.14.44 / hv_netvsc-fix-net-device-attach-on-older-windows-hosts.patch
CommitLineData
684f36d1
GKH
1From foo@baz Tue May 22 20:10:42 CEST 2018
2From: Mohammed Gamal <mgamal@redhat.com>
3Date: Mon, 14 May 2018 15:32:22 -0700
4Subject: hv_netvsc: Fix net device attach on older Windows hosts
5
6From: Mohammed Gamal <mgamal@redhat.com>
7
8[ Commit 55be9f25be1ca5bda75c39808fc77e42691bc07f upstream. ]
9
10On older windows hosts the net_device instance is returned to
11the caller of rndis_filter_device_add() without having the presence
12bit set first. This would cause any subsequent calls to network device
13operations (e.g. MTU change, channel change) to fail after the device
14is detached once, returning -ENODEV.
15
16Instead of returning the device instabce, we take the exit path where
17we call netif_device_attach()
18
19Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic")
20Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
21Reviewed-by: Stephen Hemminger <sthemmin@microsoft.com>
22Signed-off-by: David S. Miller <davem@davemloft.net>
23Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
24---
25 drivers/net/hyperv/rndis_filter.c | 2 +-
26 1 file changed, 1 insertion(+), 1 deletion(-)
27
28--- a/drivers/net/hyperv/rndis_filter.c
29+++ b/drivers/net/hyperv/rndis_filter.c
30@@ -1276,7 +1276,7 @@ struct netvsc_device *rndis_filter_devic
31 rndis_device->link_state ? "down" : "up");
32
33 if (net_device->nvsp_version < NVSP_PROTOCOL_VERSION_5)
34- return net_device;
35+ goto out;
36
37 rndis_filter_query_link_speed(rndis_device, net_device);
38