<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/ipv4/tcp.c, branch linux-2.6.37.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.37.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2010-11-24T19:47:22Z</updated>
<entry>
<title>tcp: Make TCP_MAXSEG minimum more correct.</title>
<updated>2010-11-24T19:47:22Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2010-11-24T19:47:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c39508d6f118308355468314ff414644115a07f3'/>
<id>urn:sha1:c39508d6f118308355468314ff414644115a07f3</id>
<content type='text'>
Use TCP_MIN_MSS instead of constant 64.

Reported-by: Min Zhang &lt;mzhang@mvista.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: Increase TCP_MAXSEG socket option minimum.</title>
<updated>2010-11-11T05:35:37Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2010-11-11T05:35:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7a1abd08d52fdeddb3e9a5a33f2f15cc6a5674d2'/>
<id>urn:sha1:7a1abd08d52fdeddb3e9a5a33f2f15cc6a5674d2</id>
<content type='text'>
As noted by Steve Chen, since commit
f5fff5dc8a7a3f395b0525c02ba92c95d42b7390 ("tcp: advertise MSS
requested by user") we can end up with a situation where
tcp_select_initial_window() does a divide by a zero (or
even negative) mss value.

The problem is that sometimes we effectively subtract
TCPOLEN_TSTAMP_ALIGNED and/or TCPOLEN_MD5SIG_ALIGNED from the mss.

Fix this by increasing the minimum from 8 to 64.

Reported-by: Steve Chen &lt;schen@mvista.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: avoid limits overflow</title>
<updated>2010-11-10T20:12:00Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2010-11-09T23:24:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d987e5c75107ca7515fa19e857cfa24aab6ec8f'/>
<id>urn:sha1:8d987e5c75107ca7515fa19e857cfa24aab6ec8f</id>
<content type='text'>
Robin Holt tried to boot a 16TB machine and found some limits were
reached : sysctl_tcp_mem[2], sysctl_udp_mem[2]

We can switch infrastructure to use long "instead" of "int", now
atomic_long_t primitives are available for free.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Reported-by: Robin Holt &lt;holt@sgi.com&gt;
Reviewed-by: Robin Holt &lt;holt@sgi.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2010-10-04T18:56:38Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2010-10-04T18:56:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=21a180cda012e1f93e362dd4a9b0bfd3d8c92940'/>
<id>urn:sha1:21a180cda012e1f93e362dd4a9b0bfd3d8c92940</id>
<content type='text'>
Conflicts:
	net/ipv4/Kconfig
	net/ipv4/tcp_timer.c
</content>
</entry>
<entry>
<title>tcp: Fix &gt;4GB writes on 64-bit.</title>
<updated>2010-09-28T03:24:54Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2010-09-28T03:24:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=01db403cf99f739f86903314a489fb420e0e254f'/>
<id>urn:sha1:01db403cf99f739f86903314a489fb420e0e254f</id>
<content type='text'>
Fixes kernel bugzilla #16603

tcp_sendmsg() truncates iov_len to an 'int' which a 4GB write to write
zero bytes, for example.

There is also the problem higher up of how verify_iovec() works.  It
wants to prevent the total length from looking like an error return
value.

However it does this using 'int', but syscalls return 'long' (and
thus signed 64-bit on 64-bit machines).  So it could trigger
false-positives on 64-bit as written.  So fix it to use 'long'.

Reported-by: Olaf Bonorden &lt;bono@onlinehome.de&gt;
Reported-by: Daniel Büse &lt;dbuese@gmx.de&gt;
Reported-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2010-09-27T08:03:03Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2010-09-27T08:03:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e40051d134f7ee95c8c1f7a3471e84eafc9ab326'/>
<id>urn:sha1:e40051d134f7ee95c8c1f7a3471e84eafc9ab326</id>
<content type='text'>
Conflicts:
	drivers/net/qlcnic/qlcnic_init.c
	net/ipv4/ip_output.c
</content>
</entry>
<entry>
<title>tcp: Fix race in tcp_poll</title>
<updated>2010-09-20T22:42:05Z</updated>
<author>
<name>Tom Marshall</name>
</author>
<published>2010-09-20T22:42:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a4d258036ed9b2a1811c3670c6099203a0f284a0'/>
<id>urn:sha1:a4d258036ed9b2a1811c3670c6099203a0f284a0</id>
<content type='text'>
If a RST comes in immediately after checking sk-&gt;sk_err, tcp_poll will
return POLLIN but not POLLOUT.  Fix this by checking sk-&gt;sk_err at the end
of tcp_poll.  Additionally, ensure the correct order of operations on SMP
machines with memory barriers.

Signed-off-by: Tom Marshall &lt;tdm.code@gmail.com&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2010-09-10T05:27:33Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2010-09-10T05:27:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e548833df83c3554229eff0672900bfe958b45fd'/>
<id>urn:sha1:e548833df83c3554229eff0672900bfe958b45fd</id>
<content type='text'>
Conflicts:
	net/mac80211/main.c
</content>
</entry>
<entry>
<title>tcp: Add TCP_USER_TIMEOUT socket option.</title>
<updated>2010-08-30T20:23:33Z</updated>
<author>
<name>Jerry Chu</name>
</author>
<published>2010-08-27T19:13:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dca43c75e7e545694a9dd6288553f55c53e2a3a3'/>
<id>urn:sha1:dca43c75e7e545694a9dd6288553f55c53e2a3a3</id>
<content type='text'>
This patch provides a "user timeout" support as described in RFC793. The
socket option is also needed for the the local half of RFC5482 "TCP User
Timeout Option".

TCP_USER_TIMEOUT is a TCP level socket option that takes an unsigned int,
when &gt; 0, to specify the maximum amount of time in ms that transmitted
data may remain unacknowledged before TCP will forcefully close the
corresponding connection and return ETIMEDOUT to the application. If
0 is given, TCP will continue to use the system default.

Increasing the user timeouts allows a TCP connection to survive extended
periods without end-to-end connectivity. Decreasing the user timeouts
allows applications to "fail fast" if so desired. Otherwise it may take
upto 20 minutes with the current system defaults in a normal WAN
environment.

The socket option can be made during any state of a TCP connection, but
is only effective during the synchronized states of a connection
(ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, or LAST-ACK).
Moreover, when used with the TCP keepalive (SO_KEEPALIVE) option,
TCP_USER_TIMEOUT will overtake keepalive to determine when to close a
connection due to keepalive failure.

The option does not change in anyway when TCP retransmits a packet, nor
when a keepalive probe will be sent.

This option, like many others, will be inherited by an acceptor from its
listener.

Signed-off-by: H.K. Jerry Chu &lt;hkchu@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: select(writefds) don't hang up when a peer close connection</title>
<updated>2010-08-26T06:02:48Z</updated>
<author>
<name>KOSAKI Motohiro</name>
</author>
<published>2010-08-24T16:05:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d84ba638e4ba3c40023ff997aa5e8d3ed002af36'/>
<id>urn:sha1:d84ba638e4ba3c40023ff997aa5e8d3ed002af36</id>
<content type='text'>
This issue come from ruby language community. Below test program
hang up when only run on Linux.

	% uname -mrsv
	Linux 2.6.26-2-486 #1 Sat Dec 26 08:37:39 UTC 2009 i686
	% ruby -rsocket -ve '
	BasicSocket.do_not_reverse_lookup = true
	serv = TCPServer.open("127.0.0.1", 0)
	s1 = TCPSocket.open("127.0.0.1", serv.addr[1])
	s2 = serv.accept
	s2.close
	s1.write("a") rescue p $!
	s1.write("a") rescue p $!
	Thread.new {
	  s1.write("a")
	}.join'
	ruby 1.9.3dev (2010-07-06 trunk 28554) [i686-linux]
	#&lt;Errno::EPIPE: Broken pipe&gt;
	[Hang Here]

FreeBSD, Solaris, Mac doesn't. because Ruby's write() method call
select() internally. and tcp_poll has a bug.

SUS defined 'ready for writing' of select() as following.

|  A descriptor shall be considered ready for writing when a call to an output
|  function with O_NONBLOCK clear would not block, whether or not the function
|  would transfer data successfully.

That said, EPIPE situation is clearly one of 'ready for writing'.

We don't have read-side issue because tcp_poll() already has read side
shutdown care.

|        if (sk-&gt;sk_shutdown &amp; RCV_SHUTDOWN)
|                mask |= POLLIN | POLLRDNORM | POLLRDHUP;

So, Let's insert same logic in write side.

- reference url
  http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/31065
  http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/31068

Signed-off-by: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
