netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: linux@roeck-us.net
Cc: f.fainelli@gmail.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: phy: Don't call phy_resume if phy_init_hw failed
Date: Thu, 15 May 2014 22:57:15 -0400 (EDT)	[thread overview]
Message-ID: <20140515.225715.1311338998569156758.davem@davemloft.net> (raw)
In-Reply-To: <1400098369-13985-1-git-send-email-linux@roeck-us.net>

From: Guenter Roeck <linux@roeck-us.net>
Date: Wed, 14 May 2014 13:12:49 -0700

> After the call to phy_init_hw failed in phy_attach_direct, phy_detach is called
> to detach the phy device from its network device. If the attached driver is a
> generic phy driver, this also detaches the driver. Subsequently phy_resume
> is called, which assumes without checking that a driver is attached to the
> device. This will result in a crash such as
> 
> Unable to handle kernel paging request for data at address 0xffffffffffffff90
> Faulting instruction address: 0xc0000000003a0e18
> Oops: Kernel access of bad area, sig: 11 [#1]
> ...
> NIP [c0000000003a0e18] .phy_attach_direct+0x68/0x17c
> LR [c0000000003a0e6c] .phy_attach_direct+0xbc/0x17c
> Call Trace:
> [c0000003fc0475d0] [c0000000003a0e6c] .phy_attach_direct+0xbc/0x17c (unreliable)
> [c0000003fc047670] [c0000000003a0ff8] .phy_connect_direct+0x28/0x98
> [c0000003fc047700] [c0000000003f0074] .of_phy_connect+0x4c/0xa4
> 
> Only call phy_resume if phy_init_hw was successful.
> 
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Applied and queued up for -stable, thanks.

      parent reply	other threads:[~2014-05-16  2:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14 20:12 [PATCH] net: phy: Don't call phy_resume if phy_init_hw failed Guenter Roeck
2014-05-14 20:21 ` Florian Fainelli
2014-05-16  2:57 ` 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=20140515.225715.1311338998569156758.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --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;
as well as URLs for NNTP newsgroup(s).