]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC: r237219
authorpho <pho@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 29 Jun 2012 14:14:49 +0000 (14:14 +0000)
committerpho <pho@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 29 Jun 2012 14:14:49 +0000 (14:14 +0000)
commit18337c649c66ff3b21485b760f2f6b6f99aba9a3
tree20806347c6aef1a9635aa72b4d3688df2d0ce73b
parenta5d51261dfa137adfd7bc1e618e42ab0a61d87fd
MFC: r237219

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.

git-svn-id: svn://svn.freebsd.org/base/stable/8@237780 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/tty.c