Skip to content

Commit 79cd874

Browse files
shemmingerdavem330
authored andcommitted
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>
1 parent 0d6dd35 commit 79cd874

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/hyperv/netvsc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,8 @@ void netvsc_device_remove(struct hv_device *device)
562562
/* Now, we can close the channel safely */
563563
vmbus_close(device->channel);
564564

565-
for (i = 0; i < VRSS_CHANNEL_MAX; i++)
566-
napi_disable(&net_device->chan_table[0].napi);
565+
for (i = 0; i < net_device->num_chn; i++)
566+
napi_disable(&net_device->chan_table[i].napi);
567567

568568
/* Release all resources */
569569
free_netvsc_device(net_device);

0 commit comments

Comments
 (0)