]> code.ossystems Code Review - openembedded-core.git/commit
udev-cache: stop race between sysconf and cache generation
authorRichard Tollerton <rich.tollerton@ni.com>
Mon, 8 Dec 2014 22:44:33 +0000 (16:44 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 19 Dec 2014 17:54:14 +0000 (17:54 +0000)
commit107e7fa2b2cc2e06addb83518c03b3ab769fed6f
tree250b74955fa6b1b7f15d19bd249da6da741a6ca2
parent5b051d65e797624cca3a81fc6f5c924925f3493e
udev-cache: stop race between sysconf and cache generation

The validity of the udev cache is determined by the sysconf
file (/etc/udev/cache.data). Currently, there is a substantial delay
between sysconf generation in /etc/init.d/udev and cache generation in
/etc/init.d/udev-cache. If a hotplug event arrives in the middle of
this, then the sysconf will be out of date with respect to the cache.

The solution is two-pronged. First, we minimize the race window by
regenerating the sysconf immediately before the cache, in
/etc/init.d/udev-cache. This allows us to kill the race entirely by
stopping the udev event queue while the sysconf and cache are being
generated.

Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
meta/recipes-core/udev/udev/udev-cache