svn commit: r206560 - head/sys/fs/devfs
jh at FreeBSD.org
Wed Apr 14 12:49:19 UTC 2010
Thank you for your comments.
On 2010-04-14, Kostik Belousov wrote:
> The make_dev_credf() signature can be changed to return int error code
> instead of void, and a flag, lets call it MAKEDEV_CHECKNAME, added,
make_dev_credf() returns struct cdev *, not void.
> that specifies that make_dev_credf() is allowed to fail with error
> EINVAL if supplied name is not sane. If flag is not supplied,
> make_dev_credf() should KASSERT or even just panic(9) if name
> does not pass internal validation.
Otherwise sounds reasonable suggestion. However changes are needed in
devfs. Currently devfs_populate_loop() is not along the make_dev*()
code path but make_dev(9) increases a generation counter and
devfs_populate_loop() gets called sometimes later. To make things more
complex there may be several devfs mounts with different symlinks (files).
Actually my change doesn't work correctly in all cases with multiple
devfs mounts and has another bug with cdp use counts. I am considering
reverting the change.
More information about the svn-src-head