<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src-test2/sys/net/raw_cb.c, branch release/6.2.0_cvs</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F6.2.0_cvs</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src-test2/atom?h=release%2F6.2.0_cvs'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/'/>
<updated>2007-01-11T22:54:46Z</updated>
<entry>
<title>This commit was manufactured by cvs2svn to create tag</title>
<updated>2007-01-11T22:54:46Z</updated>
<author>
<name>cvs2svn</name>
<email>cvs2svn@FreeBSD.org</email>
</author>
<published>2007-01-11T22:54:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=201f78d6b90635d961fa373ecd706e3786333b7e'/>
<id>urn:sha1:201f78d6b90635d961fa373ecd706e3786333b7e</id>
<content type='text'>
'RELENG_6_2_0_RELEASE'.

This commit was manufactured to restore the state of the 6.2-RELEASE image.
</content>
</entry>
<entry>
<title>Acquire the raw_cb mutex around LIST_REMOVE() of a raw socket control</title>
<updated>2005-01-24T22:56:09Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2005-01-24T22:56:09Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=31c436a2a9c4080f397371f80f74e85b81293a87'/>
<id>urn:sha1:31c436a2a9c4080f397371f80f74e85b81293a87</id>
<content type='text'>
block from the global raw socket list.

Submitted by:	Roselyn Lee &lt;rosel at verniernetworks dot com&gt;
MFC after:	1 week
</content>
</entry>
<entry>
<title>/* -&gt; /*- for license, minor formatting changes</title>
<updated>2005-01-07T01:45:51Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2005-01-07T01:45:51Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=c398230b64aea809cb7c5cea8db580af7097920c'/>
<id>urn:sha1:c398230b64aea809cb7c5cea8db580af7097920c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Push acquisition of the accept mutex out of sofree() into the caller</title>
<updated>2004-10-18T22:19:43Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2004-10-18T22:19:43Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=81158452be7803fda8aa36feb4464d5301dce85c'/>
<id>urn:sha1:81158452be7803fda8aa36feb4464d5301dce85c</id>
<content type='text'>
(sorele()/sotryfree()):

- This permits the caller to acquire the accept mutex before the socket
  mutex, avoiding sofree() having to drop the socket mutex and re-order,
  which could lead to races permitting more than one thread to enter
  sofree() after a socket is ready to be free'd.

- This also covers clearing of the so_pcb weak socket reference from
  the protocol to the socket, preventing races in clearing and
  evaluation of the reference such that sofree() might be called more
  than once on the same socket.

This appears to close a race I was able to easily trigger by repeatedly
opening and resetting TCP connections to a host, in which the
tcp_close() code called as a result of the RST raced with the close()
of the accepted socket in the user process resulting in simultaneous
attempts to de-allocate the same socket.  The new locking increases
the overhead for operations that may potentially free the socket, so we
will want to revise the synchronization strategy here as we normalize
the reference counting model for sockets.  The use of the accept mutex
in freeing of sockets that are not listen sockets is primarily
motivated by the potential need to remove the socket from the
incomplete connection queue on its parent (listen) socket, so cleaning
up the reference model here may allow us to substantially weaken the
synchronization requirements.

RELENG_5_3 candidate.

MFC after:	3 days
Reviewed by:	dwhite
Discussed with:	gnn, dwhite, green
Reported by:	Marc UBM Bocklet &lt;ubm at u-boot-man dot de&gt;
Reported by:	Vlad &lt;marchenko at gmail dot com&gt;
</content>
</entry>
<entry>
<title>Lock down rawcb_list, a global list of control blocks for raw sockets,</title>
<updated>2004-06-15T04:13:59Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2004-06-15T04:13:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=730262cdf704a2a69dc63ab1e38bea664118a7f1'/>
<id>urn:sha1:730262cdf704a2a69dc63ab1e38bea664118a7f1</id>
<content type='text'>
using rawcb_mtx.  Hold this mutex while modifying or iterating over
the control list; this means that the mutex is held over calls into
socket delivery code, which no longer causes a lock order reversal as
the routing socket code uses a netisr to avoid recursing socket -&gt;
routing -&gt; socket.

Note: Locking of IPsec consumers of rawcb_list is not included in this
commit.
</content>
</entry>
<entry>
<title>Extend coverage of SOCK_LOCK(so) to include so_count, the socket</title>
<updated>2004-06-12T20:47:32Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2004-06-12T20:47:32Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=395a08c90416e029c757cb51721b87b83fd0194b'/>
<id>urn:sha1:395a08c90416e029c757cb51721b87b83fd0194b</id>
<content type='text'>
reference count:

- Assert SOCK_LOCK(so) macros that directly manipulate so_count:
  soref(), sorele().

- Assert SOCK_LOCK(so) in macros/functions that rely on the state of
  so_count: sofree(), sotryfree().

- Acquire SOCK_LOCK(so) before calling these functions or macros in
  various contexts in the stack, both at the socket and protocol
  layers.

- In some cases, perform soisdisconnected() before sotryfree(), as
  this could result in frobbing of a non-present socket if
  sotryfree() actually frees the socket.

- Note that sofree()/sotryfree() will release the socket lock even if
  they don't free the socket.

Submitted by:	sam
Sponsored by:	FreeBSD Foundation
Obtained from:	BSD/OS
</content>
</entry>
<entry>
<title>Constify raw_sendspace and raw_recvspace, as they're not mutable.</title>
<updated>2004-06-11T03:52:56Z</updated>
<author>
<name>Robert Watson</name>
<email>rwatson@FreeBSD.org</email>
</author>
<published>2004-06-11T03:52:56Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=935becd8ddda9d242601819de5bedfdf3e6a7865'/>
<id>urn:sha1:935becd8ddda9d242601819de5bedfdf3e6a7865</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove advertising clause from University of California Regent's</title>
<updated>2004-04-07T20:46:16Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2004-04-07T20:46:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=f36cfd49adb62472fd7009ecd4f0927c126ff785'/>
<id>urn:sha1:f36cfd49adb62472fd7009ecd4f0927c126ff785</id>
<content type='text'>
license, per letter dated July 22, 1999 and email from Peter Wemm,
Alan Cox and Robert Watson.

Approved by: core, peter, alc, rwatson
</content>
</entry>
<entry>
<title>Back out M_* changes, per decision of the TRB.</title>
<updated>2003-02-19T05:47:46Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2003-02-19T05:47:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=a163d034fadcfb4a25ca34a2ba5f491c47b6ff69'/>
<id>urn:sha1:a163d034fadcfb4a25ca34a2ba5f491c47b6ff69</id>
<content type='text'>
Approved by: trb
</content>
</entry>
<entry>
<title>Remove M_TRYWAIT/M_WAITOK/M_WAIT.  Callers should use 0.</title>
<updated>2003-01-21T08:56:16Z</updated>
<author>
<name>Alfred Perlstein</name>
<email>alfred@FreeBSD.org</email>
</author>
<published>2003-01-21T08:56:16Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src-test2/commit/?id=44956c9863dc03344b03bdf6a83acf4e743f8e50'/>
<id>urn:sha1:44956c9863dc03344b03bdf6a83acf4e743f8e50</id>
<content type='text'>
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
</content>
</entry>
</feed>
