Commit 3714e0b
cxgb4: fix IRQ free race during driver unload
[ Upstream commit 015fe6f ]
IRQs are requested during driver's ndo_open() and then later
freed up in disable_interrupts() during driver unload.
A race exists where driver can set the CXGB4_FULL_INIT_DONE
flag in ndo_open() after the disable_interrupts() in driver
unload path checks it, and hence misses calling free_irq().
Fix by unregistering netdevice first and sync with driver's
ndo_open(). This ensures disable_interrupts() checks the flag
correctly and frees up the IRQs properly.
Fixes: b37987e ("cxgb4: Disable interrupts and napi before unregistering netdev")
Signed-off-by: Shahjada Abul Husain <shahjada@chelsio.com>
Signed-off-by: Raju Rangoju <rajur@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent d92337b commit 3714e0b
2 files changed
+13
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2643 | 2643 | | |
2644 | 2644 | | |
2645 | 2645 | | |
| 2646 | + | |
| 2647 | + | |
| 2648 | + | |
2646 | 2649 | | |
2647 | 2650 | | |
2648 | 2651 | | |
| |||
7145 | 7148 | | |
7146 | 7149 | | |
7147 | 7150 | | |
7148 | | - | |
7149 | | - | |
7150 | | - | |
7151 | | - | |
| 7151 | + | |
| 7152 | + | |
| 7153 | + | |
| 7154 | + | |
| 7155 | + | |
| 7156 | + | |
| 7157 | + | |
7152 | 7158 | | |
7153 | 7159 | | |
7154 | 7160 | | |
7155 | 7161 | | |
7156 | 7162 | | |
7157 | 7163 | | |
7158 | 7164 | | |
7159 | | - | |
7160 | | - | |
7161 | | - | |
7162 | | - | |
7163 | 7165 | | |
7164 | 7166 | | |
7165 | 7167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
584 | 587 | | |
585 | 588 | | |
586 | 589 | | |
| |||
0 commit comments