linux/drivers/net/ethernet/marvell
David Yang a3eef3d2cc net: mv643xx: move setting of netops to fix crash
mv643xx_eth_probe() connects the PHY before dev->netdev_ops is
assigned. 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: Daniel Machon <daniel.machon@microchip.com>
Link: https://patch.msgid.link/20261008022656.3592191-6-mmyangfl@gmail.com
Reviewed-by: Jijie Shao <shaojijie@huawei.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2026-10-15 10:39:21 +02:00
..
mvpp2 net: mvpp2: prevent buffer overflow in page_pool allocation 2026-09-17 14:43:29 +02:00
octeon_ep octeon_ep: Remove unnecessary semicolons in octep_oq_drop_rx() 2026-04-12 13:50:13 -07:00
octeon_ep_vf octeon_ep_vf: add NULL check for napi_build_skb() 2026-04-13 15:40:49 -07:00
octeontx2 octeontx2-pf: Fix RSS indirection table size 2026-09-30 16:58:59 -07:00
prestera Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2026-08-06 11:53:47 -07:00
Kconfig net: phy: remove Kconfig symbol MDIO_DEVRES 2025-05-14 19:12:19 -07:00
Makefile octeon_ep_vf: Add driver framework and device initialization 2024-02-12 09:01:52 +00:00
mv643xx_eth.c net: mv643xx: move setting of netops to fix crash 2026-10-15 10:39:21 +02:00
mvmdio.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
mvneta_bm.c net: mvneta: bm: fix device reference leak on failed lookup 2026-07-21 11:14:08 -07:00
mvneta_bm.h net: Fix typos 2025-07-25 10:29:07 -07:00
mvneta.c net: mvneta: clear XDP pfmemalloc flag between frames 2026-09-30 17:39:11 -07:00
pxa168_eth.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
skge.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
skge.h
sky2.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
sky2.h sky2: Make sure there is at least one frag_addr available 2023-10-02 08:03:52 +01:00