From: David Miller <davem@davemloft.net>
To: khc@pm.waw.pl
Cc: buytenh@wantstofly.org, netdev@vger.kernel.org
Subject: Re: kernel BUG at drivers/net/phy/mdio_bus.c:165!
Date: Wed, 17 Dec 2008 00:24:34 -0800 (PST) [thread overview]
Message-ID: <20081217.002434.127189543.davem@davemloft.net> (raw)
In-Reply-To: <m3ej07zg85.fsf@maximus.localdomain>
From: Krzysztof Halasa <khc@pm.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@pm.waw.pl>
Looks great, applied.
Thanks for fixing this bug Krzysztof.
prev parent reply other threads:[~2008-12-17 8:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-17 2:29 kernel BUG at drivers/net/phy/mdio_bus.c:165! Krzysztof Halasa
2008-12-17 8:24 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081217.002434.127189543.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=buytenh@wantstofly.org \
--cc=khc@pm.waw.pl \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox