Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information