Commit d30fb71
hv_netvsc: fix race of netvsc and VF register_netdevice
The rtnl lock also needs to be held before rndis_filter_device_add()
which advertises nvsp_2_vsc_capability / sriov bit, and triggers
VF NIC offering and registering. If VF NIC finished register_netdev()
earlier it may cause name based config failure.
To fix this issue, move the call to rtnl_lock() before
rndis_filter_device_add(), so VF will be registered later than netvsc
/ synthetic NIC, and gets a name numbered (ethX) after netvsc.
Cc: stable@vger.kernel.org
Fixes: e04e7a7 ("hv_netvsc: Fix a deadlock by getting rtnl lock earlier in netvsc_probe()")
Reported-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>1 parent c0e2926 commit d30fb71
1 file changed
Lines changed: 15 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2531 | 2531 | | |
2532 | 2532 | | |
2533 | 2533 | | |
2534 | | - | |
2535 | | - | |
2536 | | - | |
2537 | | - | |
2538 | | - | |
2539 | | - | |
2540 | | - | |
2541 | | - | |
2542 | | - | |
2543 | 2534 | | |
2544 | 2535 | | |
2545 | 2536 | | |
2546 | 2537 | | |
2547 | 2538 | | |
2548 | 2539 | | |
2549 | 2540 | | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
2550 | 2546 | | |
2551 | 2547 | | |
2552 | 2548 | | |
| 2549 | + | |
| 2550 | + | |
| 2551 | + | |
| 2552 | + | |
| 2553 | + | |
| 2554 | + | |
| 2555 | + | |
| 2556 | + | |
| 2557 | + | |
2553 | 2558 | | |
2554 | 2559 | | |
2555 | 2560 | | |
| |||
2586 | 2591 | | |
2587 | 2592 | | |
2588 | 2593 | | |
2589 | | - | |
2590 | 2594 | | |
2591 | 2595 | | |
| 2596 | + | |
2592 | 2597 | | |
2593 | 2598 | | |
2594 | 2599 | | |
| |||
0 commit comments