summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2017-03-09 15:04:15 -0800
committerDavid S. Miller <davem@davemloft.net>2017-03-12 23:15:43 -0700
commit79cd874c96b38694fb2b4ee3850f6fbbc3015439 (patch)
tree1ced2db009d3dd2aabd1ce674878882d75a95bfb /drivers/net
parent0d6dd35784e76bc3e052ffa13c6839d5c9bcb449 (diff)
downloadop-kernel-dev-79cd874c96b38694fb2b4ee3850f6fbbc3015439.zip
op-kernel-dev-79cd874c96b38694fb2b4ee3850f6fbbc3015439.tar.gz
netvsc: fix hang on netvsc module removal
The code in netvsc_device_remove was incorrectly calling napi_disable repeatedly on the same element. This would cause attempts to remove netvsc module to hang. Fixes: 2506b1dc4bbe ("netvsc: implement NAPI") Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/hyperv/netvsc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 0e0c757..8f9aeec 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -562,8 +562,8 @@ void netvsc_device_remove(struct hv_device *device)
/* Now, we can close the channel safely */
vmbus_close(device->channel);
- for (i = 0; i < VRSS_CHANNEL_MAX; i++)
- napi_disable(&net_device->chan_table[0].napi);
+ for (i = 0; i < net_device->num_chn; i++)
+ napi_disable(&net_device->chan_table[i].napi);
/* Release all resources */
free_netvsc_device(net_device);
OpenPOWER on IntegriCloud