netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	Realtek linux nic maintainers <nic_swsd@realtek.com>,
	David Miller <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net] r8169: fix setting driver_data after register_netdev
Date: Mon, 26 Mar 2018 01:24:39 +0200	[thread overview]
Message-ID: <20180325232439.GD19365@lunn.ch> (raw)
In-Reply-To: <20180325230700.GA1735@electric-eye.fr.zoreil.com>

On Mon, Mar 26, 2018 at 01:07:00AM +0200, Francois Romieu wrote:
> Heiner Kallweit <hkallweit1@gmail.com> :
> > pci_set_drvdata() is called only after registering the net_device,
> > therefore we could run into a NPE if one of the functions using
> > driver_data is called before it's set.
> > 
> > Fix this by calling pci_set_drvdata() before registering the
> > net_device.
> > 
> > This fix is a candidate for stable. As far as I can see the
> > bug has been there in kernel version 3.2 already, therefore
> > I can't provide a reference which commit is fixed by it.
> 
> It does not sound convincing.
> 
> Please tell which functions are supposed to crash.

How about rtl8169_get_wol() and rtl8169_set_wol(). And
rtl8169_get_ethtool_stats().  Basically anything which makes use of
run time power management could be invoked as soon as parts of
register_netdev() have been called.

	  Andrew

  reply	other threads:[~2018-03-25 23:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-25 22:32 [PATCH net] r8169: fix setting driver_data after register_netdev Heiner Kallweit
2018-03-25 23:07 ` Francois Romieu
2018-03-25 23:24   ` Andrew Lunn [this message]
2018-03-26 22:18     ` Francois Romieu
2018-03-26 22:40       ` Andrew Lunn
2018-03-26 16:54 ` David Miller

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=20180325232439.GD19365@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=romieu@fr.zoreil.com \
    /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).