]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.44/hv_netvsc-fix-error-unwind-handling-if-vmbus_open-fails.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.14.44 / hv_netvsc-fix-error-unwind-handling-if-vmbus_open-fails.patch
1 From foo@baz Tue May 22 20:10:42 CEST 2018
2 From: Stephen Hemminger <stephen@networkplumber.org>
3 Date: Mon, 14 May 2018 15:32:11 -0700
4 Subject: hv_netvsc: fix error unwind handling if vmbus_open fails
5
6 From: Stephen Hemminger <stephen@networkplumber.org>
7
8 [ Commit fcfb4a00d1e514e8313277a01ef919de1113025b upstream. ]
9
10 Need to delete NAPI association if vmbus_open fails.
11
12 Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
13 Signed-off-by: David S. Miller <davem@davemloft.net>
14 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
15 ---
16 drivers/net/hyperv/netvsc.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19 --- a/drivers/net/hyperv/netvsc.c
20 +++ b/drivers/net/hyperv/netvsc.c
21 @@ -1288,7 +1288,6 @@ struct netvsc_device *netvsc_device_add(
22 net_device->chan_table);
23
24 if (ret != 0) {
25 - netif_napi_del(&net_device->chan_table[0].napi);
26 netdev_err(ndev, "unable to open channel: %d\n", ret);
27 goto cleanup;
28 }
29 @@ -1321,6 +1320,7 @@ close:
30 vmbus_close(device->channel);
31
32 cleanup:
33 + netif_napi_del(&net_device->chan_table[0].napi);
34 free_netvsc_device(&net_device->rcu);
35
36 return ERR_PTR(ret);