kernel-hacking-2024-linux-s.../drivers/net/phy
Krzysztof Halasa e8e5752dc0 net: kernel BUG at drivers/net/phy/mdio_bus.c:165!
kernel BUG at drivers/net/phy/mdio_bus.c:165!
Unable to handle kernel NULL pointer dereference at virtual address 00000000

How?

mdiobus_alloc() sets bus->state = MDIOBUS_ALLOCATED.

mdiobus_register() sets bus->state = MDIOBUS_REGISTERED but then can
   fail (mdiobus_scan()) returning an error to the caller.

The caller aborts correctly with mdiobus_free() which does:
        if (bus->state == MDIOBUS_ALLOCATED) {
                kfree(bus);
                return;
        }

        BUG_ON(bus->state != MDIOBUS_UNREGISTERED);

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-17 00:24:13 -08:00
..
broadcom.c
cicada.c
davicom.c
fixed.c phylib: two dynamic mii_bus allocation fallout fixes 2008-10-09 09:45:04 -07:00
icplus.c
Kconfig
lxt.c
Makefile
marvell.c phy: Add support for Marvell 88E1118 PHY 2008-11-15 14:04:27 -08:00
mdio-bitbang.c
mdio-ofgpio.c
mdio_bus.c net: kernel BUG at drivers/net/phy/mdio_bus.c:165! 2008-12-17 00:24:13 -08:00
phy.c phylib: add mdiobus_{read,write} 2008-10-08 16:38:41 -07:00
phy_device.c phy: fix phy_id detection also for broken hardware. 2008-11-20 20:43:18 -08:00
qsemi.c
realtek.c
smsc.c
vitesse.c phylib: Add Vitesse VSC8221 SGMII PHY 2008-11-25 01:00:47 -08:00