Revision e8e5752dc0a56a01527055b0c37510b1d6b6b861 authored by Krzysztof Halasa on 17 December 2008, 08:24:13 UTC, committed by David S. Miller on 17 December 2008, 08:24:13 UTC
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>
1 parent 9a3de25
History
File Mode Size
Kconfig -rw-r--r-- 4.8 KB
Makefile -rw-r--r-- 392 bytes
TODO -rw-r--r-- 772 bytes
af_ax25.c -rw-r--r-- 44.3 KB
ax25_addr.c -rw-r--r-- 6.1 KB
ax25_dev.c -rw-r--r-- 4.8 KB
ax25_ds_in.c -rw-r--r-- 7.1 KB
ax25_ds_subr.c -rw-r--r-- 5.1 KB
ax25_ds_timer.c -rw-r--r-- 5.8 KB
ax25_iface.c -rw-r--r-- 5.1 KB
ax25_in.c -rw-r--r-- 10.8 KB
ax25_ip.c -rw-r--r-- 5.3 KB
ax25_out.c -rw-r--r-- 8.7 KB
ax25_route.c -rw-r--r-- 11.2 KB
ax25_std_in.c -rw-r--r-- 11.1 KB
ax25_std_subr.c -rw-r--r-- 2.3 KB
ax25_std_timer.c -rw-r--r-- 4.2 KB
ax25_subr.c -rw-r--r-- 6.9 KB
ax25_timer.c -rw-r--r-- 5.1 KB
ax25_uid.c -rw-r--r-- 4.8 KB
sysctl_net_ax25.c -rw-r--r-- 6.1 KB

back to top