linux/drivers/net/ethernet/microchip
David Yang 2a3f6d2a9a microchip: lan865x: move setting of netops to fix crash
lan865x_probe() assigns netdev_ops only after oa_tc6_init(), which
connects the internal MAC-PHY through phy_connect_direct().
phy_attach_direct() -> phy_link_topo_add_phy() reads dev->netdev_ops
through netdev_need_ops_lock() since the commit in question, so probing
crashes with a NULL pointer dereference when CONFIG_NET_SHAPER is
enabled.

Assign netdev_ops before the PHY attach, as was done for emac in commit
7c9f391ec8 ("net: emac: move setting of netops to fix crash").

Fixes: ded86da4bb ("net: ethtool: relax ethnl_req_get_phydev() locking assertion")
Signed-off-by: David Yang <mmyangfl@gmail.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20261008022656.3592191-11-mmyangfl@gmail.com
Reviewed-by: Jijie Shao <shaojijie@huawei.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15 10:39:22 +02:00
..
fdma net: microchip: dead code cleanup in kconfig for FDMA 2026-04-01 19:50:12 -07:00
lan865x microchip: lan865x: move setting of netops to fix crash 2026-10-15 10:39:22 +02:00
lan966x net: microchip: vcap: fix races on the shared Super VCAP block 2026-07-05 09:18:47 +02:00
sparx5 net: sparx5: free the matchall entry on destroy 2026-10-08 10:55:23 -07:00
vcap net: microchip: vcap: stop scanning after deleting key field 2026-09-30 10:27:59 +01:00
enc28j60_hw.h
enc28j60.c net: enc28j60: Use threaded interrupt instead of workqueue 2023-05-11 18:00:37 -07:00
encx24j600_hw.h net: encx24j600: Correct spelling in comments 2024-04-25 19:13:26 -07:00
encx24j600-regmap.c net: encx24j600: constify struct regmap_bus/regmap_config 2024-07-05 17:02:20 -07:00
encx24j600.c net: encx24j600: Correct spelling in comments 2024-04-25 19:13:26 -07:00
Kconfig net: lan969x: fix cyclic dependency reported by depmod 2024-12-09 13:30:16 +00:00
lan743x_ethtool.c net: microchip: lan743x: add ethtool nway_reset support 2026-02-24 15:10:56 +01:00
lan743x_ethtool.h net: lan743x: Add support to SGMII register dump for PCI11010/PCI11414 chips 2022-11-09 19:20:13 -08:00
lan743x_main.c net: lan743x: fix RX checksum use-after-free 2026-09-16 17:26:40 -07:00
lan743x_main.h net: lan743x: add support for RMII interface 2026-07-30 10:19:29 +02:00
lan743x_ptp.c net: lan743x: implement ndo_hwtstamp_get() 2025-05-15 17:56:38 -07:00
lan743x_ptp.h net: lan743x: fix potential out-of-bounds write in lan743x_ptp_io_event_clock_get() 2025-06-19 15:32:14 +02:00
Makefile net: lan969x: fix cyclic dependency reported by depmod 2024-12-09 13:30:16 +00:00