<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core, branch v3.2.15</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/core?h=v3.2.15</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/core?h=v3.2.15'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-04-02T16:53:08Z</updated>
<entry>
<title>net: fix napi_reuse_skb() skb reserve</title>
<updated>2012-04-02T16:53:08Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-03-21T06:58:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=905c221ccf34bd7be7947cab38b2b1296fe9243b'/>
<id>urn:sha1:905c221ccf34bd7be7947cab38b2b1296fe9243b</id>
<content type='text'>
[ Upstream commit 2a2a459eeeff48640dc557548ce576d666ab06ed ]

napi-&gt;skb is allocated in napi_get_frags() using
netdev_alloc_skb_ip_align(), with a reserve of NET_SKB_PAD +
NET_IP_ALIGN bytes.

However, when such skb is recycled in napi_reuse_skb(), it ends with a
reserve of NET_IP_ALIGN which is suboptimal.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>rtnetlink: Fix VF IFLA policy</title>
<updated>2012-04-02T16:52:36Z</updated>
<author>
<name>Greg Rose</name>
<email>gregory.v.rose@intel.com</email>
</author>
<published>2012-02-08T00:45:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2e4d3c51483d1272acb34db75695423a7e2f8163'/>
<id>urn:sha1:2e4d3c51483d1272acb34db75695423a7e2f8163</id>
<content type='text'>
commit 48752f6513012a1b078da08b145d5c40a644f058 upstream.

Add VF spoof check to IFLA policy.  The original patch I submitted to
add the spoof checking feature to rtnl failed to add the proper policy
rule that identifies the data type and len.  This patch corrects that
oversight.  No bugs have been reported against this but it may cause
some problem for the netlink message parsing that uses the policy
table.

Signed-off-by: Greg Rose &lt;gregory.v.rose@intel.com&gt;
Tested-by: Sibai Li &lt;sibai.li@intel.com&gt;
Signed-off-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>neighbour: Fixed race condition at tbl-&gt;nht</title>
<updated>2012-03-19T16:02:21Z</updated>
<author>
<name>Michel Machado</name>
<email>michel@digirati.com.br</email>
</author>
<published>2012-02-21T11:04:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=983af6e10958557843e4b5546c96e371ee3c8ddd'/>
<id>urn:sha1:983af6e10958557843e4b5546c96e371ee3c8ddd</id>
<content type='text'>
[ Upstream commit 84338a6c9dbb6ff3de4749864020f8f25d86fc81 ]

When the fixed race condition happens:

1. While function neigh_periodic_work scans the neighbor hash table
pointed by field tbl-&gt;nht, it unlocks and locks tbl-&gt;lock between
buckets in order to call cond_resched.

2. Assume that function neigh_periodic_work calls cond_resched, that is,
the lock tbl-&gt;lock is available, and function neigh_hash_grow runs.

3. Once function neigh_hash_grow finishes, and RCU calls
neigh_hash_free_rcu, the original struct neigh_hash_table that function
neigh_periodic_work was using doesn't exist anymore.

4. Once back at neigh_periodic_work, whenever the old struct
neigh_hash_table is accessed, things can go badly.

Signed-off-by: Michel Machado &lt;michel@digirati.com.br&gt;
CC: "David S. Miller" &lt;davem@davemloft.net&gt;
CC: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>gro: more generic L2 header check</title>
<updated>2012-03-01T00:31:04Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-02-08T08:51:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=156f251f74fc547065adc2aef8955f70f3237a71'/>
<id>urn:sha1:156f251f74fc547065adc2aef8955f70f3237a71</id>
<content type='text'>
[ Upstream commit 5ca3b72c5da47d95b83857b768def6172fbc080a ]

Shlomo Pongratz reported GRO L2 header check was suited for Ethernet
only, and failed on IB/ipoib traffic.

He provided a patch faking a zeroed header to let GRO aggregates frames.

Roland Dreier, Herbert Xu, and others suggested we change GRO L2 header
check to be more generic, ie not assuming L2 header is 14 bytes, but
taking into account hard_header_len.

__napi_gro_receive() has special handling for the common case (Ethernet)
to avoid a memcmp() call and use an inline optimized function instead.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Reported-by: Shlomo Pongratz &lt;shlomop@mellanox.com&gt;
Cc: Roland Dreier &lt;roland@kernel.org&gt;
Cc: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Tested-by: Sean Hefty &lt;sean.hefty@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>netpoll: netpoll_poll_dev() should access dev-&gt;flags</title>
<updated>2012-03-01T00:30:58Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-02-14T10:11:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=39994fb222e62650dc945af466f15f0696f9db7b'/>
<id>urn:sha1:39994fb222e62650dc945af466f15f0696f9db7b</id>
<content type='text'>
[ Upstream commit 58e05f357a039a94aa36475f8c110256f693a239 ]

commit 5a698af53f (bond: service netpoll arp queue on master device)
tested IFF_SLAVE flag against dev-&gt;priv_flags instead of dev-&gt;flags

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: WANG Cong &lt;amwang@redhat.com&gt;
Acked-by: Neil Horman &lt;nhorman@tuxdriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: reintroduce missing rcu_assign_pointer() calls</title>
<updated>2012-02-03T17:22:20Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-01-12T04:41:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4704f3edfdd3cc5918932577373c0dc165d52959'/>
<id>urn:sha1:4704f3edfdd3cc5918932577373c0dc165d52959</id>
<content type='text'>
[ Upstream commit cf778b00e96df6d64f8e21b8395d1f8a859ecdc7 ]

commit a9b3cd7f32 (rcu: convert uses of rcu_assign_pointer(x, NULL) to
RCU_INIT_POINTER) did a lot of incorrect changes, since it did a
complete conversion of rcu_assign_pointer(x, y) to RCU_INIT_POINTER(x,
y).

We miss needed barriers, even on x86, when y is not NULL.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
CC: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>netns: fix net_alloc_generic()</title>
<updated>2012-02-03T17:22:17Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-01-26T00:41:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a2c82f7bee1ffa9eafa1fb0bd886a7eea8c9e497'/>
<id>urn:sha1:a2c82f7bee1ffa9eafa1fb0bd886a7eea8c9e497</id>
<content type='text'>
[ Upstream commit 073862ba5d249c20bd5c49fc6d904ff0e1f6a672 ]

When a new net namespace is created, we should attach to it a "struct
net_generic" with enough slots (even empty), or we can hit the following
BUG_ON() :

[  200.752016] kernel BUG at include/net/netns/generic.h:40!
...
[  200.752016]  [&lt;ffffffff825c3cea&gt;] ? get_cfcnfg+0x3a/0x180
[  200.752016]  [&lt;ffffffff821cf0b0&gt;] ? lockdep_rtnl_is_held+0x10/0x20
[  200.752016]  [&lt;ffffffff825c41be&gt;] caif_device_notify+0x2e/0x530
[  200.752016]  [&lt;ffffffff810d61b7&gt;] notifier_call_chain+0x67/0x110
[  200.752016]  [&lt;ffffffff810d67c1&gt;] raw_notifier_call_chain+0x11/0x20
[  200.752016]  [&lt;ffffffff821bae82&gt;] call_netdevice_notifiers+0x32/0x60
[  200.752016]  [&lt;ffffffff821c2b26&gt;] register_netdevice+0x196/0x300
[  200.752016]  [&lt;ffffffff821c2ca9&gt;] register_netdev+0x19/0x30
[  200.752016]  [&lt;ffffffff81c1c67a&gt;] loopback_net_init+0x4a/0xa0
[  200.752016]  [&lt;ffffffff821b5e62&gt;] ops_init+0x42/0x180
[  200.752016]  [&lt;ffffffff821b600b&gt;] setup_net+0x6b/0x100
[  200.752016]  [&lt;ffffffff821b6466&gt;] copy_net_ns+0x86/0x110
[  200.752016]  [&lt;ffffffff810d5789&gt;] create_new_namespaces+0xd9/0x190

net_alloc_generic() should take into account the maximum index into the
ptr array, as a subsystem might use net_generic() anytime.

This also reduces number of reallocations in net_assign_generic()

Reported-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Tested-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Sjur Brændeland &lt;sjur.brandeland@stericsson.com&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Cc: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: relax rcvbuf limits</title>
<updated>2011-12-23T07:15:14Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-12-21T07:11:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0fd7bac6b6157eed6cf0cb86a1e88ba29e57c033'/>
<id>urn:sha1:0fd7bac6b6157eed6cf0cb86a1e88ba29e57c033</id>
<content type='text'>
skb-&gt;truesize might be big even for a small packet.

Its even bigger after commit 87fb4b7b533 (net: more accurate skb
truesize) and big MTU.

We should allow queueing at least one packet per receiver, even with a
low RCVBUF setting.

Reported-by: Michal Simek &lt;monstr@monstr.eu&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>rps: fix insufficient bounds checking in store_rps_dev_flow_table_cnt()</title>
<updated>2011-12-23T03:34:56Z</updated>
<author>
<name>Xi Wang</name>
<email>xi.wang@gmail.com</email>
</author>
<published>2011-12-22T13:35:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a0a129f8b6cff54ab479324a54aefdab5db4f240'/>
<id>urn:sha1:a0a129f8b6cff54ab479324a54aefdab5db4f240</id>
<content type='text'>
Setting a large rps_flow_cnt like (1 &lt;&lt; 30) on 32-bit platform will
cause a kernel oops due to insufficient bounds checking.

	if (count &gt; 1&lt;&lt;30) {
		/* Enforce a limit to prevent overflow */
		return -EINVAL;
	}
	count = roundup_pow_of_two(count);
	table = vmalloc(RPS_DEV_FLOW_TABLE_SIZE(count));

Note that the macro RPS_DEV_FLOW_TABLE_SIZE(count) is defined as:

	... + (count * sizeof(struct rps_dev_flow))

where sizeof(struct rps_dev_flow) is 8.  (1 &lt;&lt; 30) * 8 will overflow
32 bits.

This patch replaces the magic number (1 &lt;&lt; 30) with a symbolic bound.

Suggested-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: Xi Wang &lt;xi.wang@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Add a flow_cache_flush_deferred function</title>
<updated>2011-12-21T21:48:08Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2011-12-21T21:48:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c0ed1c14a72ca9ebacd51fb94a8aca488b0d361e'/>
<id>urn:sha1:c0ed1c14a72ca9ebacd51fb94a8aca488b0d361e</id>
<content type='text'>
flow_cach_flush() might sleep but can be called from
atomic context via the xfrm garbage collector. So add
a flow_cache_flush_deferred() function and use this if
the xfrm garbage colector is invoked from within the
packet path.

Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Acked-by: Timo Teräs &lt;timo.teras@iki.fi&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
