svn commit: r237219 - head/sys/kern

Ed Schouten ed at 80386.nl
Sun Sep 2 14:35:20 UTC 2012


Hi Peter,

Sorry for replying to this email so late; I moved to Germany in April
and I'm still waiting for Deutsche Telekomiker to hook up my internet
connection. Fortunately I do have a smartphone with tethering now.

All hail German bureaucracy.

2012/6/18 Peter Holm <pho at freebsd.org>:
>   In tty_makedev() the following construction:
>
>   dev = make_dev_cred();
>   dev->si_drv1 = tp;
>
>   leaves a small window where the newly created device may be opened
>   and si_drv1 is NULL.
>
>   As this is a vary rare situation, using a lock to close the window
>   seems overkill. Instead just wait for the assignment of si_drv1.

I also thought about this in the past and I guess a lot of drivers in
our tree are prone to this issue.

I think there's little more we can do here than how you've changed the
TTY code, but in my opinion a 'devfs-ng' should solve this by having a
two-step creation procedure, similar to, say, fdrop(9).

Thanks for fixing this!

-- 
Ed Schouten <ed at 80386.nl>


More information about the svn-src-head mailing list