Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Sep 2012 16:35:17 +0200
From:      Ed Schouten <ed@80386.nl>
To:        Peter Holm <pho@freebsd.org>, kib@FreeBSD.org
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r237219 - head/sys/kern
Message-ID:  <CAJOYFBDuhjRa1jdor8DuLgO26q5NQFKZg5CsN3%2B6sjxY5vt8tA@mail.gmail.com>
In-Reply-To: <201206180734.q5I7YcRv062474@svn.freebsd.org>
References:  <201206180734.q5I7YcRv062474@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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@80386.nl>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJOYFBDuhjRa1jdor8DuLgO26q5NQFKZg5CsN3%2B6sjxY5vt8tA>