[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20081217.002434.127189543.davem@davemloft.net>
Date: Wed, 17 Dec 2008 00:24:34 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: khc@...waw.pl
Cc: buytenh@...tstofly.org, netdev@...r.kernel.org
Subject: Re: kernel BUG at drivers/net/phy/mdio_bus.c:165!
From: Krzysztof Halasa <khc@...waw.pl>
Date: Wed, 17 Dec 2008 03:29:46 +0100
> 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@...waw.pl>
Looks great, applied.
Thanks for fixing this bug Krzysztof.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists