possible race condition in kdbus:domain
John de la Garza
john at jjdev.com
Wed May 7 16:22:49 PDT 2014
On Thu, May 08, 2014 at 12:20:16AM +0200, Kay Sievers wrote:
> > Adding msleep(5) fixes this in some cases do does msleep(0).
> >
> > I'm thinking this may not always work and kdbus_domain_new should
> > explicitly wait till the file shows up in /dev before returning.
> >
> > Is it safe to assume udev will finish in a fixed time or should
> > it be checked?
>
> Just mount devtmpfs at /dev, and forget about all the hacks. :)
>
> Kay
It looks like /dev is devtmpfs
root at sol:/home/john/kdbus# mount | grep devtmpfs
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=981247,mode=755)
Is this what you would expect (files not cleaned up)?
-----------------------------------------------------
root at sol:/home/john/kdbus# insmod kdbus.ko
root at sol:/home/john/kdbus# ./test/test-kdbus
RUNNING TEST 'domain make' ................... OK
SUMMARY: 1 tests passed, 0 skipped, 0 failed
root at sol:/home/john/kdbus# tree /dev/kdbus/
/dev/kdbus/
├── control
└── domain
└── blah
└── control
2 directories, 2 files
root at sol:/home/john/kdbus# ./test/test-kdbus
Assertion 'access("/dev/" KBUILD_MODNAME "/domain/blah/control", F_OK) < 0' failed in check_domain_make(), line 304
RUNNING TEST 'domain make' ................... ERROR
SUMMARY: 0 tests passed, 0 skipped, 1 failed
More information about the dbus
mailing list