CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2018/10/25 09:38:37
Modified files:
sys/kern : uipc_syscalls.c
Log message:
Fix a resource leak in doaccept().
If a connection that is being accepted gets aborted early, or if the
user-supplied buffer is invalid, doaccept() leaks a socket. This is
a regression caused by r1.153 of uipc_syscalls.c.
Correct the issue by associating the socket with the file early enough.
In case soaccept() or copyaddrout() fails, the socket will be freed
as a result of the file closing. This logic was used by the pre-r1.153
code.
closef() may block, so it is hoisted outside the fdp lock.
OK bluhm@ mpi@