Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@redhat.com>
To: rmk+kernel@armlinux.org.uk
Cc: andrew@lunn.ch, f.fainelli@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH net] sfp: fix oops with ethtool -m
Date: Tue, 18 Sep 2018 20:15:13 -0700 (PDT)	[thread overview]
Message-ID: <20180918.201513.2092519211105088804.davem@redhat.com> (raw)
In-Reply-To: <E1g2IFB-0000LN-AU@rmk-PC.armlinux.org.uk>

From: Russell King <rmk+kernel@armlinux.org.uk>
Date: Tue, 18 Sep 2018 16:48:53 +0100

> If a network interface is created prior to the SFP socket being
> available, ethtool can request module information.  This unfortunately
> leads to an oops:
> 
> Unable to handle kernel NULL pointer dereference at virtual address 00000008
> pgd = (ptrval)
> [00000008] *pgd=7c400831, *pte=00000000, *ppte=00000000
> Internal error: Oops: 17 [#1] SMP ARM
> Modules linked in:
> CPU: 0 PID: 1480 Comm: ethtool Not tainted 4.19.0-rc3 #138
> Hardware name: Broadcom Northstar Plus SoC
> PC is at sfp_get_module_info+0x8/0x10
> LR is at dev_ethtool+0x218c/0x2afc
> 
> Fix this by not filling in the network device's SFP bus pointer until
> SFP is fully bound, thereby avoiding the core calling into the SFP bus
> code.
> 
> Fixes: ce0aa27ff3f6 ("sfp: add sfp-bus to bridge between network devices and sfp cages")
> Reported-by: Florian Fainelli <f.fainelli@gmail.com>
> Tested-by: Florian Fainelli <f.fainelli@gmail.com>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>

Applied and queued up for -stable.

      reply	other threads:[~2018-09-19  8:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-18 15:48 [PATCH net] sfp: fix oops with ethtool -m Russell King
2018-09-19  3:15 ` 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=20180918.201513.2092519211105088804.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    /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