mirror of
https://github.com/torvalds/linux
synced 2024-09-22 12:26:27 +00:00
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>
This commit is contained in:
parent
0d6dd35784
commit
79cd874c96
|
@ -562,8 +562,8 @@ void netvsc_device_remove(struct hv_device *device)
|
||||||
/* Now, we can close the channel safely */
|
/* Now, we can close the channel safely */
|
||||||
vmbus_close(device->channel);
|
vmbus_close(device->channel);
|
||||||
|
|
||||||
for (i = 0; i < VRSS_CHANNEL_MAX; i++)
|
for (i = 0; i < net_device->num_chn; i++)
|
||||||
napi_disable(&net_device->chan_table[0].napi);
|
napi_disable(&net_device->chan_table[i].napi);
|
||||||
|
|
||||||
/* Release all resources */
|
/* Release all resources */
|
||||||
free_netvsc_device(net_device);
|
free_netvsc_device(net_device);
|
||||||
|
|
Loading…
Reference in a new issue