kern/130348: [socket] accept() prematurely allocates an inheritable descriptor

rwatson at FreeBSD.org rwatson at FreeBSD.org
Tue Feb 10 01:36:59 PST 2009


Synopsis: [socket] accept() prematurely allocates an inheritable descriptor

State-Changed-From-To: open->analyzed
State-Changed-By: rwatson
State-Changed-When: Tue Feb 10 09:33:38 UTC 2009
State-Changed-Why: 
This race condition is inherent to all system calls that allocate
file descriptors, especially where file descriptor allocation may
block (such as open with O_EXLOCK, open on a fifo, etc) --
threaded user application must synchronize around such calls to
deterministically prevent this result.  However, I will review
both the code and other operating systems to see whether (a) this
application race can be narrowed without affecting performance/
reliability, and (b) other systems provide a fix or workaround
such that portable applications might expect not to see this
race.




Responsible-Changed-From-To: freebsd-bugs->rwatson
Responsible-Changed-By: rwatson
Responsible-Changed-When: Tue Feb 10 09:33:38 UTC 2009
Responsible-Changed-Why: 
Grab ownership.

http://www.freebsd.org/cgi/query-pr.cgi?pr=130348


More information about the freebsd-bugs mailing list