<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core, branch v3.2.18</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/core?h=v3.2.18</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/core?h=v3.2.18'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-05-20T21:56:53Z</updated>
<entry>
<title>pktgen: fix module unload for good</title>
<updated>2012-05-20T21:56:53Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2012-05-17T23:52:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ef6bdf34a4d247f48a9c103375fd2927d7df91e7'/>
<id>urn:sha1:ef6bdf34a4d247f48a9c103375fd2927d7df91e7</id>
<content type='text'>
commit d4b1133558e0d417342d5d2c49e4c35b428ff20d upstream.

commit c57b5468406 (pktgen: fix crash at module unload) did a very poor
job with list primitives.

1) list_splice() arguments were in the wrong order

2) list_splice(list, head) has undefined behavior if head is not
initialized.

3) We should use the list_splice_init() variant to clear pktgen_threads
list.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>pktgen: fix crash at module unload</title>
<updated>2012-05-20T21:56:53Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-05-09T13:29:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=03f3b8447061afb212e374e274b0b799c0776e3f'/>
<id>urn:sha1:03f3b8447061afb212e374e274b0b799c0776e3f</id>
<content type='text'>
commit c57b54684060c8aced64a5b78ff69ff289af97b9 upstream.

commit 7d3d43dab4e9 (net: In unregister_netdevice_notifier unregister
the netdevices.) makes pktgen crashing at module unload.

[  296.820578] BUG: spinlock bad magic on CPU#6, rmmod/3267
[  296.820719]  lock: ffff880310c38000, .magic: ffff8803, .owner: &lt;none&gt;/-1, .owner_cpu: -1
[  296.820943] Pid: 3267, comm: rmmod Not tainted 3.4.0-rc5+ #254
[  296.821079] Call Trace:
[  296.821211]  [&lt;ffffffff8168a715&gt;] spin_dump+0x8a/0x8f
[  296.821345]  [&lt;ffffffff8168a73b&gt;] spin_bug+0x21/0x26
[  296.821507]  [&lt;ffffffff812b4741&gt;] do_raw_spin_lock+0x131/0x140
[  296.821648]  [&lt;ffffffff8169188e&gt;] _raw_spin_lock+0x1e/0x20
[  296.821786]  [&lt;ffffffffa00cc0fd&gt;] __pktgen_NN_threads+0x4d/0x140 [pktgen]
[  296.821928]  [&lt;ffffffffa00ccf8d&gt;] pktgen_device_event+0x10d/0x1e0 [pktgen]
[  296.822073]  [&lt;ffffffff8154ed4f&gt;] unregister_netdevice_notifier+0x7f/0x100
[  296.822216]  [&lt;ffffffffa00d2a0b&gt;] pg_cleanup+0x48/0x73 [pktgen]
[  296.822357]  [&lt;ffffffff8109528e&gt;] sys_delete_module+0x17e/0x2a0
[  296.822502]  [&lt;ffffffff81699652&gt;] system_call_fastpath+0x16/0x1b

Hold the pktgen_thread_lock while splicing pktgen_threads, and test
pktgen_exiting in pktgen_device_event() to make unload faster.

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>net: In unregister_netdevice_notifier unregister the netdevices.</title>
<updated>2012-05-20T21:56:34Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-04-06T15:33:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4b3bd838fd1c301fe29c07ac1ac4ca555e1b8119'/>
<id>urn:sha1:4b3bd838fd1c301fe29c07ac1ac4ca555e1b8119</id>
<content type='text'>
[ Upstream commit 7d3d43dab4e978d8d9ad1acf8af15c9b1c4b0f0f ]

We already synthesize events in register_netdevice_notifier and synthesizing
events in unregister_netdevice_notifier allows to us remove the need for
special case cleanup code.

This change should be safe as it adds no new cases for existing callers
of unregiser_netdevice_notifier to handle.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>netns: do not leak net_generic data on failed init</title>
<updated>2012-05-11T12:14:26Z</updated>
<author>
<name>Julian Anastasov</name>
<email>ja@ssi.bg</email>
</author>
<published>2012-04-16T04:43:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8c78926f1ce54c0766700efb5a4fcd2ee7c0edff'/>
<id>urn:sha1:8c78926f1ce54c0766700efb5a4fcd2ee7c0edff</id>
<content type='text'>
[ Upstream commit b922934d017f1cc831b017913ed7d1a56c558b43 ]

ops_init should free the net_generic data on
init failure and __register_pernet_operations should not
call ops_free when NET_NS is not enabled.

Signed-off-by: Julian Anastasov &lt;ja@ssi.bg&gt;
Reviewed-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>net: allow pskb_expand_head() to get maximum tailroom</title>
<updated>2012-05-11T12:14:22Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-04-10T20:08:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=34b0788a13e9c65440e3d736a91f75964356ad67'/>
<id>urn:sha1:34b0788a13e9c65440e3d736a91f75964356ad67</id>
<content type='text'>
[ Upstream commit 87151b8689d890dfb495081f7be9b9e257f7a2df ]

Marc Merlin reported many order-1 allocations failures in TX path on its
wireless setup, that dont make any sense with MTU=1500 network, and non
SG capable hardware.

Turns out part of the problem comes from pskb_expand_head() not using
ksize() to get exact head size given by kmalloc(). Doing the same thing
than __alloc_skb() allows more tailroom in skb and can prevent future
reallocations.

As a bonus, struct skb_shared_info becomes cache line aligned.

Reported-by: Marc MERLIN &lt;marc@merlins.org&gt;
Tested-by: Marc MERLIN &lt;marc@merlins.org&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>net: fix a race in sock_queue_err_skb()</title>
<updated>2012-05-11T12:14:21Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-04-06T08:49:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8a0885b2113dfe7d1fb4f981a3d3c712ad90619c'/>
<id>urn:sha1:8a0885b2113dfe7d1fb4f981a3d3c712ad90619c</id>
<content type='text'>
[ Upstream commit 110c43304db6f06490961529536c362d9ac5732f ]

As soon as an skb is queued into socket error queue, another thread
can consume it, so we are not allowed to reference skb anymore, or risk
use after free.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>net: fix /proc/net/dev regression</title>
<updated>2012-05-11T12:14:16Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-04-02T22:33:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=205648388f15b1ccf92b09ba0cf141cdd62bf711'/>
<id>urn:sha1:205648388f15b1ccf92b09ba0cf141cdd62bf711</id>
<content type='text'>
[ Upstream commit 2def16ae6b0c77571200f18ba4be049b03d75579 ]

Commit f04565ddf52 (dev: use name hash for dev_seq_ops) added a second
regression, as some devices are missing from /proc/net/dev if many
devices are defined.

When seq_file buffer is filled, the last -&gt;next/show() method is
canceled (pos value is reverted to value prior -&gt;next() call)

Problem is after above commit, we dont restart the lookup at right
position in -&gt;start() method.

Fix this by removing the internal 'pos' pointer added in commit, since
we need to use the 'loff_t *pos' provided by seq_file layer.

This also reverts commit 5cac98dd0 (net: Fix corruption
in /proc/*/net/dev_mcast), since its not needed anymore.

Reported-by: Ben Greear &lt;greearb@candelatech.com&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: Mihai Maruseac &lt;mmaruseac@ixiacom.com&gt;
Tested-by:  Ben Greear &lt;greearb@candelatech.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<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>
</feed>
