Hi Denys,
On Mon, Sep 19, 2011 at 12:12:47PM +0200, Denys Vlasenko wrote:
> On Fri, Sep 16, 2011 at 11:05 AM, Baruch Siach <[email protected]> wrote:
> > Hi Walter,
> >
> > On Wed, Sep 14, 2011 at 11:55:08PM -0400, Walter Dnes wrote:
> >
> > [snip]
> >
> >> Gentoo has /bin/busybox as part of the default system. There is also
> >> an option to build busybox with libraries statically linked. IANAPP
> >> (I Am Not A Professional Programmer), but I can do quite a bit of bash
> >> scripting etc. In Gentoo, the user generally knows what peripherals he
> >> has permanently connected to the machine. Plus you'll get the usual USB
> >> keys and external drives being hooked up occasionally.
> >>
> >> If mdev can replace udev a lot of Gentoo users would be very happy.
> >> You might even have to start a separate "mdev-users" list <G>.
> >
> > I haven't seen a mention of the inherently racy nature of the hotplug
> > mechanism on which mdev relies. Below is an explanation taken from
> > http://www.kernel.org/doc/pending/hotplug.txt (down at the moment).
> >
> > <quote>
> >
> > A note about race conditions (or "why bother with netlink?"):
> > =============================================================
> ...
> > In theory, transient devices (which are created and removed again almost
> > instantly, which can be caused by poorly written drivers that fail their
> > device probe) could have similar "leftover" /dev entries from the
> > /sbin/hotplug mechanism. (If two processes are spawned simultaneously,
> > which
> > one completes first is not guaranteed.) This is not common, but
> > theoretically
> > possible.
>
> $SEQNUM thing is supposed to take care of that, no?
AFAIK, there is no robust way for the mdev running on $SEQNUM == N to know
whether the one doing $SEQNUM == N-1 has finished its business.
[snip]
> If /dev/mdev.seq file exists, mdev will wait for its value
> to match $SEQNUM variable. This prevents plug/unplug races.
This assumes that the mdev of $SEQNUM == N-1 had a chance to run and update
(or create) the /dev/mdev.seq file before the mdev doing $SEQNUM == N read it.
What happens when the mdev of N-1 dies before updating mdev.seq?
baruch
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- [email protected] - tel: +972.2.679.5364, http://www.tkos.co.il -
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox