netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: joe@perches.com
Cc: steve.glendinning@smsc.com, netdev@vger.kernel.org
Subject: Re: [PATCH] Fix netdev_printk null dereference
Date: Fri, 05 Mar 2010 07:03:39 -0800 (PST)	[thread overview]
Message-ID: <20100305.070339.166010174.davem@davemloft.net> (raw)
In-Reply-To: <1267800620.3832.17.camel@Joe-Laptop.home>

From: Joe Perches <joe@perches.com>
Date: Fri, 05 Mar 2010 06:50:20 -0800

> On Fri, 2010-03-05 at 06:39 -0800, David Miller wrote:
>> From: Steve Glendinning <steve.glendinning@smsc.com>
>> Date: Fri,  5 Mar 2010 12:47:05 +0000
>> 
>> > This patch fixes a reproducible null dereference in smsc95xx (and I
>> > suspect others) when the device is removed during a control register
>> > access.  This can be reproduced by rapidly plugging and unplugging
>> > the device during its initialisation.
>> > 
>> > Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
>> 
>> The parent shouldn't become NULL until the device is totally quiesced
>> and is no longer accesses.
>> 
>> Maybe you can instead fix the smsc95xx driver to abide by this rule
>> instead of adding a conditional check to thousands of other drivers in
>> the tree that do not need this?
>> 
>> I really have no intention of adding your change, please fix this
>> properly, thanks.
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> Perhaps something like this is appropriate in the mean time:
> 
> const char *get_netdev_parent_name(const struct net_device *dev)
> {
> 	if (!dev->dev.parent)
> 		return "Unparented net_device, please report this";
> 	return netdev->dev.parent;
> }

Yes,  but in the smsc95xx driver. :-)


  reply	other threads:[~2010-03-05 15:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-05 12:47 [PATCH] Fix netdev_printk null dereference Steve Glendinning
2010-03-05 14:39 ` David Miller
2010-03-05 14:50   ` Joe Perches
2010-03-05 15:03     ` David Miller [this message]
2010-03-05 15:29   ` Steve.Glendinning
2010-03-05 15:43     ` David Miller
2010-03-05 16:32       ` Steve.Glendinning
2010-03-05 16:42         ` 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=20100305.070339.166010174.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=joe@perches.com \
    --cc=netdev@vger.kernel.org \
    --cc=steve.glendinning@smsc.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).