cvs commit: src/sys/kern uipc_usrreq.c
Robert Watson
rwatson at FreeBSD.org
Thu Mar 1 11:07:19 UTC 2007
rwatson 2007-03-01 11:07:18 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_6)
sys/kern uipc_usrreq.c
Log:
Merge uipc_usrreq.c:1.183 from HEAD to RELENG_6:
Close a race that occurs when using sendto() to connect and send on a
UNIX domain socket at the same time as the remote host is closing the
new connections as quickly as they open. Since the connect() and
send() paths are non-atomic with respect to another, it is possible
for the second thread's close() call to disconnect the two sockets
as connect() returns, leading to the consumer (which plans to send())
with a NULL kernel pointer to its proposed peer. As a result, after
acquiring the UNIX domain socket subsystem lock, we need to revalidate
the connection pointers even though connect() has technically succeed,
and reurn an error to say that there's no connection on which to
perform the send.
We might want to rethink the specific errno number, perhaps ECONNRESET
would be better.
Reported by: Young Hyun <youngh at caida dot org>
PR: 100940
Revision Changes Path
1.155.2.9 +23 -2 src/sys/kern/uipc_usrreq.c
More information about the cvs-src
mailing list