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
Makefile -rw-r--r-- 164 bytes
file-mmu.c -rw-r--r-- 1.5 KB
file-nommu.c -rw-r--r-- 7.8 KB
inode.c -rw-r--r-- 5.8 KB
internal.h -rw-r--r-- 536 bytes

back to top