Commit 9745780
iavf: Add waiting so the port is initialized in remove
There exist races when port is being configured and remove is
triggered.
unregister_netdev is not and can't be called under crit_lock
mutex since it is calling ndo_stop -> iavf_close which requires
this lock. Depending on init state the netdev could be still
unregistered so unregister_netdev never cleans up, when shortly
after that the device could become registered.
Make iavf_remove wait until port finishes initialization.
All critical state changes are atomic (under crit_lock).
Crashes that come from iavf_reset_interrupt_capability and
iavf_free_traffic_irqs should now be solved in a graceful
manner.
Fixes: 605ca7c ("iavf: Fix kernel BUG in free_msi_irqs")
Signed-off-by: Slawomir Laba <[email protected]>
Signed-off-by: Phani Burra <[email protected]>
Signed-off-by: Jacob Keller <[email protected]>
Signed-off-by: Mateusz Palczewski <[email protected]>
Tested-by: Konrad Jankowski <[email protected]>
Signed-off-by: Tony Nguyen <[email protected]>1 parent fc2e6b3 commit 9745780
1 file changed
+16
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4558 | 4558 | | |
4559 | 4559 | | |
4560 | 4560 | | |
4561 | | - | |
4562 | 4561 | | |
4563 | 4562 | | |
4564 | 4563 | | |
| |||
4568 | 4567 | | |
4569 | 4568 | | |
4570 | 4569 | | |
| 4570 | + | |
| 4571 | + | |
| 4572 | + | |
| 4573 | + | |
| 4574 | + | |
| 4575 | + | |
| 4576 | + | |
| 4577 | + | |
| 4578 | + | |
| 4579 | + | |
| 4580 | + | |
| 4581 | + | |
| 4582 | + | |
| 4583 | + | |
| 4584 | + | |
| 4585 | + | |
4571 | 4586 | | |
4572 | 4587 | | |
4573 | 4588 | | |
| |||
4605 | 4620 | | |
4606 | 4621 | | |
4607 | 4622 | | |
4608 | | - | |
4609 | | - | |
4610 | | - | |
4611 | | - | |
4612 | | - | |
4613 | | - | |
4614 | | - | |
4615 | | - | |
4616 | | - | |
4617 | | - | |
4618 | 4623 | | |
4619 | 4624 | | |
4620 | 4625 | | |
| |||
0 commit comments