<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core, branch v3.0.22</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/core?h=v3.0.22</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/core?h=v3.0.22'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-02-13T19:06:13Z</updated>
<entry>
<title>net: fix NULL dereferences in check_peer_redir()</title>
<updated>2012-02-13T19:06:13Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-02-09T21:13:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8a533666d1591cf4ea596c6bd710e2fe682cb56a'/>
<id>urn:sha1:8a533666d1591cf4ea596c6bd710e2fe682cb56a</id>
<content type='text'>
[ Upstream commit d3aaeb38c40e5a6c08dd31a1b64da65c4352be36, along
  with dependent backports of commits:
     69cce1d1404968f78b177a0314f5822d5afdbbfb
     9de79c127cccecb11ae6a21ab1499e87aa222880
     218fa90f072e4aeff9003d57e390857f4f35513e
     580da35a31f91a594f3090b7a2c39b85cb051a12
     f7e57044eeb1841847c24aa06766c8290c202583
     e049f28883126c689cf95859480d9ee4ab23b7fa ]

Gergely Kalman reported crashes in check_peer_redir().

It appears commit f39925dbde778 (ipv4: Cache learned redirect
information in inetpeer.) added a race, leading to possible NULL ptr
dereference.

Since we can now change dst neighbour, we should make sure a reader can
safely use a neighbour.

Add RCU protection to dst neighbour, and make sure check_peer_redir()
can be called safely by different cpus in parallel.

As neighbours are already freed after one RCU grace period, this patch
should not add typical RCU penalty (cache cold effects)

Many thanks to Gergely for providing a pretty report pointing to the
bug.

Reported-by: Gergely Kalman &lt;synapse@hippy.csoma.elte.hu&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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>netns: fix net_alloc_generic()</title>
<updated>2012-02-03T17:19:03Z</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=561331eae0a03d0c4cf60f3cf485aa3e8aa5ab48'/>
<id>urn:sha1:561331eae0a03d0c4cf60f3cf485aa3e8aa5ab48</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: Handle different key sizes between address families in flow cache</title>
<updated>2011-11-11T17:37:17Z</updated>
<author>
<name>dpward</name>
<email>david.ward@ll.mit.edu</email>
</author>
<published>2011-09-05T16:47:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3fa57c1bf5fb311544199b7837a08b9f5bf5e6e4'/>
<id>urn:sha1:3fa57c1bf5fb311544199b7837a08b9f5bf5e6e4</id>
<content type='text'>
commit aa1c366e4febc7f5c2b84958a2dd7cd70e28f9d0 upstream.

With the conversion of struct flowi to a union of AF-specific structs, some
operations on the flow cache need to account for the exact size of the key.

Signed-off-by: David Ward &lt;david.ward@ll.mit.edu&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Kim Phillips &lt;kim.phillips@freescale.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>net: Unlock sock before calling sk_free()</title>
<updated>2011-11-11T17:36:50Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2011-10-25T02:30:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5796ee30587cb5f887a7fe6182c2bbcc3d31f0ad'/>
<id>urn:sha1:5796ee30587cb5f887a7fe6182c2bbcc3d31f0ad</id>
<content type='text'>
[ Upstream commit b0691c8ee7c28a72748ff32e91b165ec12ae4de6 ]

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&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>net: hold sock reference while processing tx timestamps</title>
<updated>2011-11-11T17:35:52Z</updated>
<author>
<name>Richard Cochran</name>
<email>richardcochran@gmail.com</email>
</author>
<published>2011-10-21T00:49:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=babba877daf7a7ee0cb03dfb5e63f23e2d32dddf'/>
<id>urn:sha1:babba877daf7a7ee0cb03dfb5e63f23e2d32dddf</id>
<content type='text'>
commit da92b194cc36b5dc1fbd85206aeeffd80bee0c39 upstream.

The pair of functions,

 * skb_clone_tx_timestamp()
 * skb_complete_tx_timestamp()

were designed to allow timestamping in PHY devices. The first
function, called during the MAC driver's hard_xmit method, identifies
PTP protocol packets, clones them, and gives them to the PHY device
driver. The PHY driver may hold onto the packet and deliver it at a
later time using the second function, which adds the packet to the
socket's error queue.

As pointed out by Johannes, nothing prevents the socket from
disappearing while the cloned packet is sitting in the PHY driver
awaiting a timestamp. This patch fixes the issue by taking a reference
on the socket for each such packet. In addition, the comments
regarding the usage of these function are expanded to highlight the
rule that PHY drivers must use skb_complete_tx_timestamp() to release
the packet, in order to release the socket reference, too.

These functions first appeared in v2.6.36.

Reported-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: Richard Cochran &lt;richard.cochran@omicron.at&gt;
Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Reviewed-by: Johannes Berg &lt;johannes@sipsolutions.net&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>rtnetlink: Add missing manual netlink notification in dev_change_net_namespaces</title>
<updated>2011-11-11T17:35:50Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2011-10-21T06:24:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=32779fa06584fdcab2228a36c3a846fa0a6f5cdb'/>
<id>urn:sha1:32779fa06584fdcab2228a36c3a846fa0a6f5cdb</id>
<content type='text'>
commit d2237d35748e7f448a9c2d9dc6a85ef637466e24 upstream.

Renato Westphal noticed that since commit a2835763e130c343ace5320c20d33c281e7097b7
"rtnetlink: handle rtnl_link netlink notifications manually" was merged
we no longer send a netlink message when a networking device is moved
from one network namespace to another.

Fix this by adding the missing manual notification in dev_change_net_namespaces.

Since all network devices that are processed by dev_change_net_namspaces are
in the initialized state the complicated tests that guard the manual
rtmsg_ifinfo calls in rollback_registered and register_netdevice are
unnecessary and we can just perform a plain notification.

Tested-by: Renato Westphal &lt;renatowestphal@gmail.com&gt;
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: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>scm: Capture the full credentials of the scm sender</title>
<updated>2011-10-03T18:40:54Z</updated>
<author>
<name>Tim Chen</name>
<email>tim.c.chen@linux.intel.com</email>
</author>
<published>2011-08-09T06:48:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=265d5c2eb22550566cf4193df46596dac439374c'/>
<id>urn:sha1:265d5c2eb22550566cf4193df46596dac439374c</id>
<content type='text'>
[ Upstream commit e33f7a9f37d486f4c6cce5de18a6eea11d68f64f ]

This patch corrects an erroneous update of credential's gid with uid
introduced in commit 257b5358b32f17 since 2.6.36.

Signed-off-by: Tim Chen &lt;tim.c.chen@linux.intel.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Reviewed-by: James Morris &lt;jmorris@namei.org&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>fib:fix BUG_ON in fib_nl_newrule when add new fib rule</title>
<updated>2011-10-03T18:40:51Z</updated>
<author>
<name>Gao feng</name>
<email>gaofeng@cn.fujitsu.com</email>
</author>
<published>2011-09-11T15:36:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cbab190c501c8034b82e0dd9da7fdb4b75e08daa'/>
<id>urn:sha1:cbab190c501c8034b82e0dd9da7fdb4b75e08daa</id>
<content type='text'>
[ Upstream commit 561dac2d410ffac0b57a23b85ae0a623c1a076ca ]

add new fib rule can cause BUG_ON happen
the reproduce shell is
ip rule add pref 38
ip rule add pref 38
ip rule add to 192.168.3.0/24 goto 38
ip rule del pref 38
ip rule add to 192.168.3.0/24 goto 38
ip rule add pref 38

then the BUG_ON will happen
del BUG_ON and use (ctarget == NULL) identify whether this rule is unresolved

Signed-off-by: Gao feng &lt;gaofeng@cn.fujitsu.com&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: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>arp: fix rcu lockdep splat in arp_process()</title>
<updated>2011-10-03T18:40:50Z</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2011-08-22T19:32:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8e24aecbcdd00d94474a6e2e61bed59866c0d539'/>
<id>urn:sha1:8e24aecbcdd00d94474a6e2e61bed59866c0d539</id>
<content type='text'>
[ Upstream commit 20e6074eb8e096b3a595c093d1cb222f378cd671 ]

Dave Jones reported a lockdep splat triggered by an arp_process() call
from parp_redo().

Commit faa9dcf793be (arp: RCU changes) is the origin of the bug, since
it assumed arp_process() was called under rcu_read_lock(), which is not
true in this particular path.

Instead of adding rcu_read_lock() in parp_redo(), I chose to add it in
neigh_proxy_process() to take care of IPv6 side too.

 ===================================================
 [ INFO: suspicious rcu_dereference_check() usage. ]
 ---------------------------------------------------
 include/linux/inetdevice.h:209 invoked rcu_dereference_check() without
protection!

 other info that might help us debug this:

 rcu_scheduler_active = 1, debug_locks = 0
 4 locks held by setfiles/2123:
  #0:  (&amp;sb-&gt;s_type-&gt;i_mutex_key#13){+.+.+.}, at: [&lt;ffffffff8114cbc4&gt;]
walk_component+0x1ef/0x3e8
  #1:  (&amp;isec-&gt;lock){+.+.+.}, at: [&lt;ffffffff81204bca&gt;]
inode_doinit_with_dentry+0x3f/0x41f
  #2:  (&amp;tbl-&gt;proxy_timer){+.-...}, at: [&lt;ffffffff8106a803&gt;]
run_timer_softirq+0x157/0x372
  #3:  (class){+.-...}, at: [&lt;ffffffff8141f256&gt;] neigh_proxy_process
+0x36/0x103

 stack backtrace:
 Pid: 2123, comm: setfiles Tainted: G        W
3.1.0-0.rc2.git7.2.fc16.x86_64 #1
 Call Trace:
  &lt;IRQ&gt;  [&lt;ffffffff8108ca23&gt;] lockdep_rcu_dereference+0xa7/0xaf
  [&lt;ffffffff8146a0b7&gt;] __in_dev_get_rcu+0x55/0x5d
  [&lt;ffffffff8146a751&gt;] arp_process+0x25/0x4d7
  [&lt;ffffffff8146ac11&gt;] parp_redo+0xe/0x10
  [&lt;ffffffff8141f2ba&gt;] neigh_proxy_process+0x9a/0x103
  [&lt;ffffffff8106a8c4&gt;] run_timer_softirq+0x218/0x372
  [&lt;ffffffff8106a803&gt;] ? run_timer_softirq+0x157/0x372
  [&lt;ffffffff8141f220&gt;] ? neigh_stat_seq_open+0x41/0x41
  [&lt;ffffffff8108f2f0&gt;] ? mark_held_locks+0x6d/0x95
  [&lt;ffffffff81062bb6&gt;] __do_softirq+0x112/0x25a
  [&lt;ffffffff8150d27c&gt;] call_softirq+0x1c/0x30
  [&lt;ffffffff81010bf5&gt;] do_softirq+0x4b/0xa2
  [&lt;ffffffff81062f65&gt;] irq_exit+0x5d/0xcf
  [&lt;ffffffff8150dc11&gt;] smp_apic_timer_interrupt+0x7c/0x8a
  [&lt;ffffffff8150baf3&gt;] apic_timer_interrupt+0x73/0x80
  &lt;EOI&gt;  [&lt;ffffffff8108f439&gt;] ? trace_hardirqs_on_caller+0x121/0x158
  [&lt;ffffffff814fc285&gt;] ? __slab_free+0x30/0x24c
  [&lt;ffffffff814fc283&gt;] ? __slab_free+0x2e/0x24c
  [&lt;ffffffff81204e74&gt;] ? inode_doinit_with_dentry+0x2e9/0x41f
  [&lt;ffffffff81204e74&gt;] ? inode_doinit_with_dentry+0x2e9/0x41f
  [&lt;ffffffff81204e74&gt;] ? inode_doinit_with_dentry+0x2e9/0x41f
  [&lt;ffffffff81130cb0&gt;] kfree+0x108/0x131
  [&lt;ffffffff81204e74&gt;] inode_doinit_with_dentry+0x2e9/0x41f
  [&lt;ffffffff81204fc6&gt;] selinux_d_instantiate+0x1c/0x1e
  [&lt;ffffffff81200f4f&gt;] security_d_instantiate+0x21/0x23
  [&lt;ffffffff81154625&gt;] d_instantiate+0x5c/0x61
  [&lt;ffffffff811563ca&gt;] d_splice_alias+0xbc/0xd2
  [&lt;ffffffff811b17ff&gt;] ext4_lookup+0xba/0xeb
  [&lt;ffffffff8114bf1e&gt;] d_alloc_and_lookup+0x45/0x6b
  [&lt;ffffffff8114cbea&gt;] walk_component+0x215/0x3e8
  [&lt;ffffffff8114cdf8&gt;] lookup_last+0x3b/0x3d
  [&lt;ffffffff8114daf3&gt;] path_lookupat+0x82/0x2af
  [&lt;ffffffff8110fc53&gt;] ? might_fault+0xa5/0xac
  [&lt;ffffffff8110fc0a&gt;] ? might_fault+0x5c/0xac
  [&lt;ffffffff8114c564&gt;] ? getname_flags+0x31/0x1ca
  [&lt;ffffffff8114dd48&gt;] do_path_lookup+0x28/0x97
  [&lt;ffffffff8114df2c&gt;] user_path_at+0x59/0x96
  [&lt;ffffffff811467ad&gt;] ? cp_new_stat+0xf7/0x10d
  [&lt;ffffffff811469a6&gt;] vfs_fstatat+0x44/0x6e
  [&lt;ffffffff811469ee&gt;] vfs_lstat+0x1e/0x20
  [&lt;ffffffff81146b3d&gt;] sys_newlstat+0x1a/0x33
  [&lt;ffffffff8108f439&gt;] ? trace_hardirqs_on_caller+0x121/0x158
  [&lt;ffffffff812535fe&gt;] ? trace_hardirqs_on_thunk+0x3a/0x3f
  [&lt;ffffffff8150af82&gt;] system_call_fastpath+0x16/0x1b

Reported-by: Dave Jones &lt;davej@redhat.com&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: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>net: allow netif_carrier to be called safely from IRQ</title>
<updated>2011-08-16T01:31:39Z</updated>
<author>
<name>stephen hemminger</name>
<email>shemminger@vyatta.com</email>
</author>
<published>2011-07-22T12:53:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c8656c500dd6e88d427547abe2859213a916a3ea'/>
<id>urn:sha1:c8656c500dd6e88d427547abe2859213a916a3ea</id>
<content type='text'>
[ Upstream commit 1821f7cd65ad9ea56580b830ac79bf4c4fef59cb ]

As reported by Ben Greer and Froncois Romieu. The code path in
the netif_carrier code leads it to try and disable
a late workqueue to reenable it immediately
netif_carrier_on
-&gt; linkwatch_fire_event
   -&gt; linkwatch_schedule_work
      -&gt; cancel_delayed_work
         -&gt; del_timer_sync

If __cancel_delayed_work is used instead then there is no
problem of waiting for running linkwatch_event.

There is a race between linkwatch_event running re-scheduling
but it is harmless to schedule an extra scan of the linkwatch queue.

Signed-off-by: Stephen Hemminger &lt;shemminger@vyatta.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>
</feed>
