netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: Steve.Glendinning@smsc.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] Fix netdev_printk null dereference
Date: Fri, 05 Mar 2010 08:42:40 -0800 (PST)	[thread overview]
Message-ID: <20100305.084240.180649738.davem@davemloft.net> (raw)
In-Reply-To: <OFD404CD3D.9F15042C-ON802576DD.00595AB8-802576DD.005AD9A8@smsc.com>

From: Steve.Glendinning@smsc.com
Date: Fri, 5 Mar 2010 16:32:03 +0000

> David Miller <davem@davemloft.net> wrote on 05/03/2010 15:43:35:
> 
>> Even more importantly, why does a USB disconnect NULL out the netdev
>> parent device pointer?  Until you actually release this USB device in
>> the driver, the parent pointer should stay there.
> 
> Most of the time it's not nulled out, and the code succesfully prints
> errors as expected, but maybe 1 time in 20 dev.parent is NULL.

I think until the device driver puts it's references and whatnot
of the device it's driving, that parent pointer should be kept
non-NULL.

As long as the netdevice exists and is registered, for example, people
can get at the parent device chain via SYSFS file accesses and
similar.

So it seems to me this is a huge problem waiting to happen anyways and
this netdev_printk() issue is merely making the problem more obvious
:-)

      reply	other threads:[~2010-03-05 16:42 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
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 [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=20100305.084240.180649738.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=Steve.Glendinning@smsc.com \
    --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).