linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Schwarzott <zzam@gentoo.org>
To: linux-hotplug@vger.kernel.org
Subject: Race condition for udev/persistent-net
Date: Thu, 18 Jan 2007 10:31:55 +0000	[thread overview]
Message-ID: <200701181131.55452.zzam@gentoo.org> (raw)

Hi there!

I am trying to find out why the persistent-net-rules only work sometimes for 
me (using udev-103-r3 on gentoo).

Steps to reproduce: (All files I use are relative to /etc/udev/rules.d)

1. Make sure 70-persistent-net.rules exists.
If not try reloading network modules
and running udevtrigger.

2. Modify NAME-Part of rules to something not used as default (either 
non "eth", or higher numbers like eth7 ...)

3. udevcontol reload_rules


After these steps one can try wheather the existing rules now get applied 
every time or not by:

4. rmmod and modprobe network module.

5. Verify name by "ifconfig -a|grep Ethernet"

6. If name is wrong executing udevtrigger and recheck.

For me the name was correct in 3 out of 15 tries.


The generated rules look like this for me (after changing NAME):
# PCI device 0x8086:0x1076 (e1000)
SUBSYSTEM="net", DRIVERS="?*", ATTRS{address}="xx:xx:xx:xx:xx:xx", 
NAME="eth8"

It seems that DRIVERS is not always set when trying this rule. Removing it, or 
adding next rule to 05-udev-early.rules helped:
ACTION="add", SUBSYSTEM="net", WAIT_FOR_SYSFS="device/driver"


But the problem with this rule is: udev now waits also for a driver entry for 
loopback/bridge devices. This gives ugly log/console output.

Is there a better place to put such a wait-rule?



It is also possible to just skip the DRIVERS="?*" part from the generated 
rules and only keep it in the generator (with the wait inside the generating 
part) to set a reasonable comment.


Greetings
Matthias Schwarzott

-- 
Matthias Schwarzott (zzam)

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

             reply	other threads:[~2007-01-18 10:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-18 10:31 Matthias Schwarzott [this message]
2007-01-18 12:08 ` Race condition for udev/persistent-net Bryan Kadzban
2007-01-24 10:08 ` Matthias Schwarzott
2007-01-24 10:22 ` Kay Sievers

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=200701181131.55452.zzam@gentoo.org \
    --to=zzam@gentoo.org \
    --cc=linux-hotplug@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).