Commit 9d51db4
ixgbe: handle close/suspend race with netif_device_detach/present
[ Upstream commit f7f37e7ff2b9b7eff7fbd035569cab35896869a3 ]
When an interface is part of a namespace it is possible that
ixgbe_close() may be called while __ixgbe_shutdown() is running
which ends up in a double free WARN and/or a BUG in free_msi_irqs().
To handle this situation we extend the rtnl_lock() to protect the
call to netif_device_detach() and ixgbe_clear_interrupt_scheme()
in __ixgbe_shutdown() and check for netif_device_present()
to avoid clearing the interrupts second time in ixgbe_close();
Also extend the rtnl lock in ixgbe_resume() to netif_device_attach().
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@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 f12976c commit 9d51db4
1 file changed
Lines changed: 8 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5878 | 5878 | | |
5879 | 5879 | | |
5880 | 5880 | | |
5881 | | - | |
| 5881 | + | |
| 5882 | + | |
5882 | 5883 | | |
5883 | 5884 | | |
5884 | 5885 | | |
| |||
5923 | 5924 | | |
5924 | 5925 | | |
5925 | 5926 | | |
5926 | | - | |
5927 | 5927 | | |
5928 | | - | |
5929 | | - | |
5930 | | - | |
5931 | | - | |
| 5928 | + | |
| 5929 | + | |
| 5930 | + | |
5932 | 5931 | | |
5933 | | - | |
| 5932 | + | |
5934 | 5933 | | |
5935 | 5934 | | |
5936 | 5935 | | |
| |||
5945 | 5944 | | |
5946 | 5945 | | |
5947 | 5946 | | |
| 5947 | + | |
5948 | 5948 | | |
5949 | 5949 | | |
5950 | | - | |
5951 | 5950 | | |
5952 | 5951 | | |
5953 | | - | |
5954 | 5952 | | |
5955 | 5953 | | |
| 5954 | + | |
5956 | 5955 | | |
5957 | 5956 | | |
5958 | 5957 | | |
| |||
0 commit comments