Commit e400c74
e1000: Hold RTNL when e1000_down can be called
e1000_down calls netif_queue_set_napi, which assumes that RTNL is held.
There are a few paths for e1000_down to be called in e1000 where RTNL is
not currently being held:
- e1000_shutdown (pci shutdown)
- e1000_suspend (power management)
- e1000_reinit_locked (via e1000_reset_task delayed work)
- e1000_io_error_detected (via pci error handler)
Hold RTNL in three places to fix this issue:
- e1000_reset_task: igc, igb, and e100e all hold rtnl in this path.
- e1000_io_error_detected (pci error handler): e1000e and ixgbe hold
rtnl in this path. A patch has been posted for igc to do the same
[1].
- __e1000_shutdown (which is called from both e1000_shutdown and
e1000_suspend): igb, ixgbe, and e1000e all hold rtnl in the same
path.
The other paths which call e1000_down seemingly hold RTNL and are OK:
- e1000_close (ndo_stop)
- e1000_change_mtu (ndo_change_mtu)
Based on the above analysis and mailing list discussion [2], I believe
adding rtnl in the three places mentioned above is correct.
Fixes: 8f7ff18 ("e1000: Link NAPI instances to queues and IRQs")
Reported-by: Dmitry Antipov <dmantipov@yandex.ru>
Closes: https://lore.kernel.org/netdev/8cf62307-1965-46a0-a411-ff0080090ff9@yandex.ru/
Link: https://lore.kernel.org/netdev/20241022215246.307821-3-jdamato@fastly.com/ [1]
Link: https://lore.kernel.org/netdev/ZxgVRX7Ne-lTjwiJ@LQ3V64L9R2/ [2]
Signed-off-by: Joe Damato <jdamato@fastly.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>1 parent 4d26b6e commit e400c74
1 file changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3509 | 3509 | | |
3510 | 3510 | | |
3511 | 3511 | | |
| 3512 | + | |
3512 | 3513 | | |
| 3514 | + | |
3513 | 3515 | | |
3514 | 3516 | | |
3515 | 3517 | | |
| |||
5074 | 5076 | | |
5075 | 5077 | | |
5076 | 5078 | | |
| 5079 | + | |
5077 | 5080 | | |
| 5081 | + | |
5078 | 5082 | | |
5079 | 5083 | | |
5080 | 5084 | | |
| |||
5235 | 5239 | | |
5236 | 5240 | | |
5237 | 5241 | | |
| 5242 | + | |
5238 | 5243 | | |
5239 | 5244 | | |
5240 | | - | |
| 5245 | + | |
| 5246 | + | |
5241 | 5247 | | |
| 5248 | + | |
5242 | 5249 | | |
5243 | 5250 | | |
5244 | 5251 | | |
5245 | 5252 | | |
5246 | 5253 | | |
5247 | 5254 | | |
| 5255 | + | |
5248 | 5256 | | |
5249 | 5257 | | |
5250 | 5258 | | |
| |||
0 commit comments