From: "David S. Miller" <davem@redhat.com>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: krkumar@us.ibm.com, netdev@oss.sgi.com
Subject: Re: [PATCH] panic during unregister_netdevice()
Date: Wed, 5 Nov 2003 16:33:50 -0800 [thread overview]
Message-ID: <20031105163350.66bf2763.davem@redhat.com> (raw)
In-Reply-To: <20031105163025.796cc462.shemminger@osdl.org>
On Wed, 5 Nov 2003 16:30:25 -0800
Stephen Hemminger <shemminger@osdl.org> wrote:
> Hey, what if the dev refcount goes to zero before your dev_hold?
> Actually this repeated notifier looks like it wouldn't work anyway.
> Why would a protocol drop it's reference when notified a second time?
>
> I would argue even running the loop once means some protocol is busted.
If the loops runs once or twice that is not a bug, it is possible for
processes to grab onto the device via rtnetlink queries and similar
and we have to pause and potentially schedule to deal with that.
The core problem is that we end up putting the device reference to
zero a second time, and for that reason we should prevent it by
holding onto a reference around the entire loop and wait for the
refcount to drop to '1'.
That would fix the bug wouldn't it?
next prev parent reply other threads:[~2003-11-06 0:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-06 0:00 [PATCH] panic during unregister_netdevice() Krishna Kumar
2003-11-06 0:30 ` Stephen Hemminger
2003-11-06 0:33 ` David S. Miller [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-11-06 0:26 Krishna Kumar
2003-11-06 0:42 Krishna Kumar
2003-11-06 1:09 ` Stephen Hemminger
2003-11-06 1:16 Krishna Kumar
2003-11-06 1:20 Krishna Kumar
2003-11-06 1:33 ` Stephen Hemminger
2003-11-06 1:42 Krishna Kumar
2003-11-06 19:58 Krishna Kumar
2003-11-06 19:59 ` David S. Miller
2003-11-06 21:07 ` Krishna Kumar
2003-11-06 21:14 ` David S. 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=20031105163350.66bf2763.davem@redhat.com \
--to=davem@redhat.com \
--cc=krkumar@us.ibm.com \
--cc=netdev@oss.sgi.com \
--cc=shemminger@osdl.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).