linux/drivers/net
Sean Anderson f0f2b992d8 net: phy: Don't register LEDs for genphy
If a PHY has no driver, the genphy driver is probed/removed directly in
phy_attach/detach. If the PHY's ofnode has an "leds" subnode, then the
LEDs will be (un)registered when probing/removing the genphy driver.
This could occur if the leds are for a non-generic driver that isn't
loaded for whatever reason. Synchronously removing the PHY device in
phy_detach leads to the following deadlock:

rtnl_lock()
ndo_close()
    ...
    phy_detach()
        phy_remove()
            phy_leds_unregister()
                led_classdev_unregister()
                    led_trigger_set()
                        netdev_trigger_deactivate()
                            unregister_netdevice_notifier()
                                rtnl_lock()

There is a corresponding deadlock on the open/register side of things
(and that one is reported by lockdep), but it requires a race while this
one is deterministic.

Generic PHYs do not support LEDs anyway, so don't bother registering
them.

Fixes: 01e5b728e9 ("net: phy: Add a binding for PHY LEDs")
Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Link: https://patch.msgid.link/20250707195803.666097-1-sean.anderson@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-07-14 17:53:09 -07:00
..
arcnet treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
bonding
caif
can can: m_can: m_can_handle_lost_msg(): downgrade msg lost in rx message to debug level 2025-07-11 12:18:58 +02:00
dsa Including fixes from bluetooth and wireless. 2025-06-12 09:50:36 -07:00
ethernet net: emaclite: Fix missing pointer increment in aligned_read() 2025-07-11 16:37:06 -07:00
fddi treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
fjes
hamradio treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
hippi treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
hyperv hv_netvsc: fix potential deadlock in netvsc_vf_setxdp() 2025-05-30 19:31:25 -07:00
ieee802154
ipa
ipvlan
mctp
mdio
netdevsim net: drv: netdevsim: don't napi_complete() from netpoll 2025-06-12 08:11:52 -07:00
ovpn ovpn: avoid sleep in atomic context in TCP RX error path 2025-06-03 13:08:15 +02:00
pcs
phy net: phy: Don't register LEDs for genphy 2025-07-14 17:53:09 -07:00
plip
ppp
pse-pd
slip treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
team
thunderbolt
usb net: usb: lan78xx: fix WARN in __netif_napi_del_locked on disconnect 2025-06-30 18:26:22 -07:00
vmxnet3 vmxnet3: correctly report gso type for UDP tunnels 2025-06-03 11:54:26 +02:00
vxlan treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
wan treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
wireguard treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
wireless wifi: mt76: mt792x: Limit the concurrent STA and SoftAP to operate on the same channel 2025-07-07 18:07:43 +02:00
wwan net: wwan: mhi_wwan_mbim: use correct mux_id for multiplexing 2025-06-05 12:27:20 +02:00
xen-netback treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
amt.c
bareudp.c
dummy.c
eql.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
geneve.c
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c macsec: MACsec SCI assignment for ES = 0 2025-06-11 10:12:01 +01:00
macvlan.c
macvtap.c
Makefile
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c netconsole: fix appending sysdata when sysdata_fields == SYSDATA_RELEASE 2025-06-10 15:52:08 -07:00
netkit.c
nlmon.c
ntb_netdev.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
pfcp.c
rionet.c
Space.c
sungem_phy.c
tap.c
tun.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
tun_vnet.h
veth.c veth: prevent NULL pointer dereference in veth_xdp_rcv 2025-06-12 08:08:32 -07:00
virtio_net.c virtio_net: Enforce minimum TX ring size for reliability 2025-07-03 11:40:02 +02:00
vrf.c
vsockmon.c
xen-netfront.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00