Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Jul 2006 23:00:05 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern uipc_usrreq.c
Message-ID:  <200607312300.k6VN06sQ089923@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
rwatson     2006-07-31 23:00:05 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             uipc_usrreq.c 
  Log:
  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.
  
  PR:             100940
  Reported by:    Young Hyun <youngh at caida dot org>
  MFC after:      2 weeks
  MFC note:       Some adaptation will be required
  
  Revision  Changes    Path
  1.183     +22 -2     src/sys/kern/uipc_usrreq.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607312300.k6VN06sQ089923>