Re: hotplug mopup

From: Andrew Morton (andrewm@uow.edu.au)
Date: Sun Dec 10 2000 - 08:25:51 EST


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/



This archive was generated by hypermail 2b29 : Fri Dec 15 2000 - 21:00:19 EST