<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/ipv4/tcp.c, branch linux-2.6.36.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.36.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.36.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-01-07T21:58:25Z</updated>
<entry>
<title>tcp: Make TCP_MAXSEG minimum more correct.</title>
<updated>2011-01-07T21:58:25Z</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=60352f160a1a9d430f119a40924b0c3338ed5449'/>
<id>urn:sha1:60352f160a1a9d430f119a40924b0c3338ed5449</id>
<content type='text'>
[ Upstream commit c39508d6f118308355468314ff414644115a07f3 ]

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>tcp: Increase TCP_MAXSEG socket option minimum.</title>
<updated>2011-01-07T21:58:25Z</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=b4b3549b743a59b62a9324d2c9fa59a5f6bf00b3'/>
<id>urn:sha1:b4b3549b743a59b62a9324d2c9fa59a5f6bf00b3</id>
<content type='text'>
[ Upstream commit 7a1abd08d52fdeddb3e9a5a33f2f15cc6a5674d2 ]

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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</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>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>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>
<entry>
<title>tcp: fix three tcp sysctls tuning</title>
<updated>2010-08-26T06:02:17Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2010-08-26T06:02:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c5ed63d66f24fd4f7089b5a6e087b0ce7202aa8e'/>
<id>urn:sha1:c5ed63d66f24fd4f7089b5a6e087b0ce7202aa8e</id>
<content type='text'>
As discovered by Anton Blanchard, current code to autotune 
tcp_death_row.sysctl_max_tw_buckets, sysctl_tcp_max_orphans and
sysctl_max_syn_backlog makes little sense.

The bigger a page is, the less tcp_max_orphans is : 4096 on a 512GB
machine in Anton's case.

(tcp_hashinfo.bhash_size * sizeof(struct inet_bind_hashbucket))
is much bigger if spinlock debugging is on. Its wrong to select bigger
limits in this case (where kernel structures are also bigger)

bhash_size max is 65536, and we get this value even for small machines. 

A better ground is to use size of ehash table, this also makes code
shorter and more obvious.

Based on a patch from Anton, and another from David.

Reported-and-tested-by: Anton Blanchard &lt;anton@samba.org&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>tcp: Combat per-cpu skew in orphan tests.</title>
<updated>2010-08-25T09:27:49Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2010-08-25T09:27:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ad1af0fedba14f82b240a03fe20eb9b2fdbd0357'/>
<id>urn:sha1:ad1af0fedba14f82b240a03fe20eb9b2fdbd0357</id>
<content type='text'>
As reported by Anton Blanchard when we use
percpu_counter_read_positive() to make our orphan socket limit checks,
the check can be off by up to num_cpus_online() * batch (which is 32
by default) which on a 128 cpu machine can be as large as the default
orphan limit itself.

Fix this by doing the full expensive sum check if the optimized check
triggers.

Reported-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2010-08-03T05:22:46Z</updated>
<author>
<name>David S. Miller</name>
</author>
<published>2010-08-03T05:22:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=00dad5e479531e379aba7358600cc768725d4f1f'/>
<id>urn:sha1:00dad5e479531e379aba7358600cc768725d4f1f</id>
<content type='text'>
Conflicts:
	drivers/net/e1000e/hw.h
	net/bridge/br_device.c
	net/bridge/br_input.c
</content>
</entry>
<entry>
<title>net: Add getsockopt support for TCP thin-streams</title>
<updated>2010-08-03T00:25:06Z</updated>
<author>
<name>Josh Hunt</name>
</author>
<published>2010-07-30T13:49:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c0fef0b7d36e5f8d3ea3731a8228102274e3c23'/>
<id>urn:sha1:3c0fef0b7d36e5f8d3ea3731a8228102274e3c23</id>
<content type='text'>
Initial TCP thin-stream commit did not add getsockopt support for the new
socket options: TCP_THIN_LINEAR_TIMEOUTS and TCP_THIN_DUPACK. This adds support
for them.

Signed-off-by: Josh Hunt &lt;johunt@akamai.com&gt;
Tested-by: Andreas Petlund &lt;apetlund@simula.no&gt;
Acked-by: Andreas Petlund &lt;apetlund@simula.no&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: cookie transactions setsockopt memory leak</title>
<updated>2010-07-31T06:04:07Z</updated>
<author>
<name>Dmitry Popov</name>
</author>
<published>2010-07-29T01:59:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a3bdb549e30e7a263f7a589747c40e9c50110315'/>
<id>urn:sha1:a3bdb549e30e7a263f7a589747c40e9c50110315</id>
<content type='text'>
There is a bug in do_tcp_setsockopt(net/ipv4/tcp.c),
TCP_COOKIE_TRANSACTIONS case.
In some cases (when tp-&gt;cookie_values == NULL) new tcp_cookie_values
structure can be allocated (at cvp), but not bound to
tp-&gt;cookie_values. So a memory leak occurs.

Signed-off-by: Dmitry Popov &lt;dp@highloadlab.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
