Commit ba83011
igb: close/suspend race in netif_device_detach
[ Upstream commit 9474933caf21a4cb5147223dca1551f527aaac36 ]
Similar to ixgbe, when an interface is part of a namespace it is
possible that igb_close() may be called while __igb_shutdown() is
running which ends up in a double free WARN and/or a BUG in
free_msi_irqs().
Extend the rtnl_lock() to protect the call to netif_device_detach() and
igb_clear_interrupt_scheme() in __igb_shutdown() and check for
netif_device_present() to avoid calling igb_clear_interrupt_scheme() a
second time in igb_close().
Also extend the rtnl lock in igb_resume() to netif_device_attach().
Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 559a208 commit ba83011
1 file changed
Lines changed: 12 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3172 | 3172 | | |
3173 | 3173 | | |
3174 | 3174 | | |
3175 | | - | |
| 3175 | + | |
| 3176 | + | |
| 3177 | + | |
3176 | 3178 | | |
3177 | 3179 | | |
3178 | 3180 | | |
| |||
7325 | 7327 | | |
7326 | 7328 | | |
7327 | 7329 | | |
| 7330 | + | |
7328 | 7331 | | |
7329 | 7332 | | |
7330 | 7333 | | |
7331 | 7334 | | |
7332 | 7335 | | |
7333 | 7336 | | |
| 7337 | + | |
7334 | 7338 | | |
7335 | 7339 | | |
7336 | 7340 | | |
| |||
7450 | 7454 | | |
7451 | 7455 | | |
7452 | 7456 | | |
7453 | | - | |
7454 | | - | |
| 7457 | + | |
| 7458 | + | |
7455 | 7459 | | |
7456 | | - | |
7457 | | - | |
7458 | | - | |
7459 | | - | |
7460 | 7460 | | |
7461 | | - | |
7462 | | - | |
| 7461 | + | |
| 7462 | + | |
| 7463 | + | |
| 7464 | + | |
| 7465 | + | |
7463 | 7466 | | |
7464 | 7467 | | |
7465 | 7468 | | |
| |||
0 commit comments