linux/drivers/net
Joe Damato e400c7444d 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: 8f7ff18a5e ("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>
2024-11-13 10:30:21 -08:00
..
arcnet
bonding bonding: return detailed error when loading native XDP fails 2024-10-28 16:09:42 -07:00
caif
can move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
dsa net: dsa: mt7530: Add TBF qdisc offload support 2024-11-03 12:53:42 -08:00
ethernet e1000: Hold RTNL when e1000_down can be called 2024-11-13 10:30:21 -08:00
fddi
fjes net: fjes: use ethtool string helpers 2024-10-31 19:36:59 -07:00
hamradio TTY/Serial driver update for 6.12-rc1 2024-09-26 09:59:50 -07:00
hippi
hyperv Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-10-25 09:08:22 +02:00
ieee802154 net: Switch back to struct platform_driver::remove() 2024-10-04 16:39:57 -07:00
ipa net: Switch back to struct platform_driver::remove() 2024-10-04 16:39:57 -07:00
ipvlan ipvlan: Prepare ipvlan_process_v4_outbound() to future .flowi4_tos conversion. 2024-11-03 14:28:37 -08:00
mctp mctp i2c: handle NULL header address 2024-10-29 11:22:38 -07:00
mdio Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-10-21 09:14:18 +02:00
netdevsim Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-10-31 18:10:07 -07:00
pcs net: pcs: xpcs: remove return statements in void function 2024-10-23 16:10:16 +02:00
phy net: phy: use ethtool string helpers 2024-11-03 11:07:46 -08:00
plip net: plip: fix break; causing plip to never transmit 2024-10-19 16:06:55 -05:00
ppp ppp: fix ppp_async_encode() illegal access 2024-10-10 08:47:13 -07:00
pse-pd net: pse-pd: Fix out of bound for loop 2024-10-19 15:55:56 -05:00
slip slip: make slhc_remember() more robust against malicious packets 2024-10-10 09:06:32 -07:00
team netpoll: remove ndo_netpoll_setup() second argument 2024-10-23 13:31:32 +02:00
thunderbolt
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-10-31 18:10:07 -07:00
vmxnet3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-10-21 09:14:18 +02:00
vxlan net: vxlan: update the document for vxlan_snoop() 2024-10-18 13:16:48 +01:00
wan net: Switch back to struct platform_driver::remove() 2024-10-04 16:39:57 -07:00
wireguard netdev_features: convert NETIF_F_LLTX to dev->lltx 2024-09-03 11:36:43 +02:00
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-10-31 18:10:07 -07:00
wwan wwan: core: Pass string literal as format argument of dev_set_name() 2024-10-29 11:45:54 -07:00
xen-netback net/xen-netback: prevent UAF in xenvif_flush_hash() 2024-08-28 17:07:42 -07:00
amt.c netdev_features: convert NETIF_F_NETNS_LOCAL to dev->netns_local 2024-09-03 11:36:43 +02:00
bareudp.c bareudp: Use pcpu stats to update rx_dropped counter. 2024-10-28 11:16:32 +00:00
dummy.c netdev_features: convert NETIF_F_LLTX to dev->lltx 2024-09-03 11:36:43 +02:00
eql.c
geneve.c net: tunnel: make skb_vlan_inet_prepare() return drop reasons 2024-10-13 11:33:08 +01:00
gtp.c gtp: allow -1 to be specified as file description from userspace 2024-10-29 11:24:08 -07:00
ifb.c
Kconfig testing: net-drv: add basic shaper test 2024-10-10 08:30:23 -07:00
LICENSE.SRC
loopback.c netdev_features: convert NETIF_F_NETNS_LOCAL to dev->netns_local 2024-09-03 11:36:43 +02:00
macsec.c macsec: Fix use-after-free while sending the offloading packet 2024-10-28 16:13:50 -07:00
macvlan.c netpoll: remove ndo_netpoll_setup() second argument 2024-10-23 13:31:32 +02:00
macvtap.c
Makefile
mdio.c
mhi_net.c
mii.c
net_failover.c netdev_features: convert NETIF_F_NETNS_LOCAL to dev->netns_local 2024-09-03 11:36:43 +02:00
netconsole.c net: netconsole: split send_msg_fragmented 2024-10-22 15:44:25 +02:00
netkit.c netkit: Simplify netkit mode over to use NLA_POLICY_MAX 2024-10-07 17:12:37 -07:00
nlmon.c netdev_features: convert NETIF_F_LLTX to dev->lltx 2024-09-03 11:36:43 +02:00
ntb_netdev.c
pfcp.c
rionet.c netdev_features: convert NETIF_F_LLTX to dev->lltx 2024-09-03 11:36:43 +02:00
sb1000.c
Space.c
sungem_phy.c
tap.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
tun.c appletalk: Remove deadcode 2024-10-04 12:42:32 +01:00
veth.c netdev_features: convert NETIF_F_LLTX to dev->lltx 2024-09-03 11:36:43 +02:00
virtio_net.c virtio_net: rx remove premapped failover code 2024-11-05 11:37:41 +01:00
vrf.c vrf: Prepare vrf_process_v4_outbound() to future .flowi4_tos conversion. 2024-11-03 14:29:05 -08:00
vsockmon.c netdev_features: convert NETIF_F_LLTX to dev->lltx 2024-09-03 11:36:43 +02:00
xen-netfront.c