public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <andrewm@uow.edu.au>
To: Jeff Garzik <jgarzik@mandrakesoft.com>
Cc: David Brownell <david-b@pacbell.net>,
	lkml <linux-kernel@vger.kernel.org>,
	"linux-usb-devel@lists.sourceforge.net" 
	<linux-usb-devel@lists.sourceforge.net>,
	Linus Torvalds <torvalds@transmeta.com>,
	"David S. Miller" <davem@redhat.com>
Subject: Re: hotplug mopup
Date: Mon, 11 Dec 2000 00:25:51 +1100	[thread overview]
Message-ID: <3A33845F.9FB3EE81@uow.edu.au> (raw)
In-Reply-To: <3A3377B3.FDCBE4AD@uow.edu.au> <3A337DF1.DD9516C7@mandrakesoft.com>

Jeff Garzik wrote:
> 
> Andrew Morton wrote:
> > - On the unregister/removal path, the netdevice layer ensures that
> >   the interface is removed from the kernel namespace prior to launching
> >   `/sbin/hotplug net unregister eth0'.
> >
> >   This means that when handling netdevice unregistration
> >   /sbin/hotplug cannot and must not attempt to do anything with eth0!
> >   Generally it'll fail to find an interface with this name.  If it does
> >   find eth0, it'll be the wrong one due to a race.
> 
> This is not a bug.  'unregister eth0' says to userspace "eth0 just
> disappeared."

Yes.  I was simply pointing out a restriction which is placed upon
/sbin/hotplug in this situation.

> Read my previous messages on the subject:  Add events like NETDEV_UP,
> NETDEV_DOWN, and NETDEV_GOING_DOWN to netdev_event_names[] if you want
> to call /sbin/hotplug for other netdev events.

erm..  I just deleted netdev_event_names[].  Without it, the way to do this
is to put

	net_run_sbin_hotplug(dev, "netdev_going_down");

in the appropriate place.

I deleted it because of the 'Rebroadcast unregister notification' crap
in unregister_netdevice.  If you want the netdev_event_names[] flexibility
back then we probably should kill the rebroadcast stuff.

But now that /sbin/hotplug is run asynchronously (Linus did it!) I
don't think this flexibility buys us much.  You'll end up with
'/sbin/hotplug net netdev_going_down' and '/sbin/hotplug net netdev_down'
running simultaneously.  What can they do?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  reply	other threads:[~2000-12-10 13:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-10 12:31 hotplug mopup Andrew Morton
2000-12-10 12:58 ` Jeff Garzik
2000-12-10 13:25   ` Andrew Morton [this message]
2000-12-10 15:10 ` Marcus Meissner
2000-12-11  2:36   ` Albert D. Cahalan
2000-12-11  7:04     ` Andrew Morton
2000-12-10 16:35 ` David Brownell
  -- strict thread matches above, loose matches on Subject: below --
2000-12-11 21:10 David Brownell

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=3A33845F.9FB3EE81@uow.edu.au \
    --to=andrewm@uow.edu.au \
    --cc=davem@redhat.com \
    --cc=david-b@pacbell.net \
    --cc=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=torvalds@transmeta.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