Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commit8348e04

Browse files
shemmingerdavem330
authored andcommitted
hv_netvsc: disable NAPI before channel close
This makes sure that no CPU is still process packets whenthe channel is closed.Fixes:76bb5db ("netvsc: fix use after free on module removal")Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent68e2ffd commit8348e04

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎drivers/net/hyperv/netvsc.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,10 @@ void netvsc_device_remove(struct hv_device *device)
568568

569569
RCU_INIT_POINTER(net_device_ctx->nvdev,NULL);
570570

571+
/* And disassociate NAPI context from device */
572+
for (i=0;i<net_device->num_chn;i++)
573+
netif_napi_del(&net_device->chan_table[i].napi);
574+
571575
/*
572576
* At this point, no one should be accessing net_device
573577
* except in here
@@ -579,10 +583,6 @@ void netvsc_device_remove(struct hv_device *device)
579583

580584
netvsc_teardown_gpadl(device,net_device);
581585

582-
/* And dissassociate NAPI context from device */
583-
for (i=0;i<net_device->num_chn;i++)
584-
netif_napi_del(&net_device->chan_table[i].napi);
585-
586586
/* Release all resources */
587587
free_netvsc_device_rcu(net_device);
588588
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp