<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/core, branch v3.2.11-rt20</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>softirq: Check preemption after reenabling interrupts</title>
<updated>2012-03-14T15:50:16+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2011-11-13T16:17:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=990011db2733e6258e9da6180c55598c782b03e1'/>
<id>990011db2733e6258e9da6180c55598c782b03e1</id>
<content type='text'>
raise_softirq_irqoff() disables interrupts and wakes the softirq
daemon, but after reenabling interrupts there is no preemption check,
so the execution of the softirq thread might be delayed arbitrarily.

In principle we could add that check to local_irq_enable/restore, but
that's overkill as the rasie_softirq_irqoff() sections are the only
ones which show this behaviour.

Reported-by: Carsten Emde &lt;cbe@osadl.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: stable-rt@vger.kernel.org
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
raise_softirq_irqoff() disables interrupts and wakes the softirq
daemon, but after reenabling interrupts there is no preemption check,
so the execution of the softirq thread might be delayed arbitrarily.

In principle we could add that check to local_irq_enable/restore, but
that's overkill as the rasie_softirq_irqoff() sections are the only
ones which show this behaviour.

Reported-by: Carsten Emde &lt;cbe@osadl.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: stable-rt@vger.kernel.org
</pre>
</div>
</content>
</entry>
<entry>
<title>net: Avoid livelock in net_tx_action() on RT</title>
<updated>2012-03-14T15:50:13+00:00</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2011-10-06T14:48:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ca03ad092d04a219b725d07b92e9d8f1de6f3542'/>
<id>ca03ad092d04a219b725d07b92e9d8f1de6f3542</id>
<content type='text'>
qdisc_lock is taken w/o disabling interrupts or bottom halfs. So code
holding a qdisc_lock() can be interrupted and softirqs can run on the
return of interrupt in !RT.

The spin_trylock() in net_tx_action() makes sure, that the softirq
does not deadlock. When the lock can't be acquired q is requeued and
the NET_TX softirq is raised. That causes the softirq to run over and
over.

That works in mainline as do_softirq() has a retry loop limit and
leaves the softirq processing in the interrupt return path and
schedules ksoftirqd. The task which holds qdisc_lock cannot be
preempted, so the lock is released and either ksoftirqd or the next
softirq in the return from interrupt path can proceed. Though it's a
bit strange to actually run MAX_SOFTIRQ_RESTART (10) loops before it
decides to bail out even if it's clear in the first iteration :)

On RT all softirq processing is done in a FIFO thread and we don't
have a loop limit, so ksoftirqd preempts the lock holder forever and
unqueues and requeues until the reset button is hit.

Due to the forced threading of ksoftirqd on RT we actually cannot
deadlock on qdisc_lock because it's a "sleeping lock". So it's safe to
replace the spin_trylock() with a spin_lock(). When contended,
ksoftirqd is scheduled out and the lock holder can proceed.

[ tglx: Massaged changelog and code comments ]

Solved-by: Thomas Gleixner &lt;tglx@linuxtronix.de&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Tested-by: Carsten Emde &lt;cbe@osadl.org&gt;
Cc: Clark Williams &lt;williams@redhat.com&gt;
Cc: John Kacur &lt;jkacur@redhat.com&gt;
Cc: Luis Claudio R. Goncalves &lt;lclaudio@redhat.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
qdisc_lock is taken w/o disabling interrupts or bottom halfs. So code
holding a qdisc_lock() can be interrupted and softirqs can run on the
return of interrupt in !RT.

The spin_trylock() in net_tx_action() makes sure, that the softirq
does not deadlock. When the lock can't be acquired q is requeued and
the NET_TX softirq is raised. That causes the softirq to run over and
over.

That works in mainline as do_softirq() has a retry loop limit and
leaves the softirq processing in the interrupt return path and
schedules ksoftirqd. The task which holds qdisc_lock cannot be
preempted, so the lock is released and either ksoftirqd or the next
softirq in the return from interrupt path can proceed. Though it's a
bit strange to actually run MAX_SOFTIRQ_RESTART (10) loops before it
decides to bail out even if it's clear in the first iteration :)

On RT all softirq processing is done in a FIFO thread and we don't
have a loop limit, so ksoftirqd preempts the lock holder forever and
unqueues and requeues until the reset button is hit.

Due to the forced threading of ksoftirqd on RT we actually cannot
deadlock on qdisc_lock because it's a "sleeping lock". So it's safe to
replace the spin_trylock() with a spin_lock(). When contended,
ksoftirqd is scheduled out and the lock holder can proceed.

[ tglx: Massaged changelog and code comments ]

Solved-by: Thomas Gleixner &lt;tglx@linuxtronix.de&gt;
Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Tested-by: Carsten Emde &lt;cbe@osadl.org&gt;
Cc: Clark Williams &lt;williams@redhat.com&gt;
Cc: John Kacur &lt;jkacur@redhat.com&gt;
Cc: Luis Claudio R. Goncalves &lt;lclaudio@redhat.com&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>skbufhead-raw-lock.patch</title>
<updated>2012-03-14T15:50:12+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2011-07-12T13:38:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0de6e76b6cc367165356e63e12d293bce126daf6'/>
<id>0de6e76b6cc367165356e63e12d293bce126daf6</id>
<content type='text'>
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net-netif_rx_ni-migrate-disable.patch</title>
<updated>2012-03-14T15:50:05+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2011-07-17T14:29:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d10bdd8ec4c0068bc75b5aa260e66b5dedec64a1'/>
<id>d10bdd8ec4c0068bc75b5aa260e66b5dedec64a1</id>
<content type='text'>
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>softirq-thread-do-softirq.patch</title>
<updated>2012-03-14T15:49:48+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2011-06-28T13:44:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cfdb3bd22600f74ae33df7535ac562c122dc654d'/>
<id>cfdb3bd22600f74ae33df7535ac562c122dc654d</id>
<content type='text'>
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net-flip-lock-dep-thingy.patch</title>
<updated>2012-03-14T15:49:48+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2011-06-28T08:59:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=56e5bb7b9d9da0fbca4d8949f959bff714c15323'/>
<id>56e5bb7b9d9da0fbca4d8949f959bff714c15323</id>
<content type='text'>
=======================================================
[ INFO: possible circular locking dependency detected ]
3.0.0-rc3+ #26
-------------------------------------------------------
ip/1104 is trying to acquire lock:
 (local_softirq_lock){+.+...}, at: [&lt;ffffffff81056d12&gt;] __local_lock+0x25/0x68

but task is already holding lock:
 (sk_lock-AF_INET){+.+...}, at: [&lt;ffffffff81433308&gt;] lock_sock+0x10/0x12

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-&gt; #1 (sk_lock-AF_INET){+.+...}:
       [&lt;ffffffff810836e5&gt;] lock_acquire+0x103/0x12e
       [&lt;ffffffff813e2781&gt;] lock_sock_nested+0x82/0x92
       [&lt;ffffffff81433308&gt;] lock_sock+0x10/0x12
       [&lt;ffffffff81433afa&gt;] tcp_close+0x1b/0x355
       [&lt;ffffffff81453c99&gt;] inet_release+0xc3/0xcd
       [&lt;ffffffff813dff3f&gt;] sock_release+0x1f/0x74
       [&lt;ffffffff813dffbb&gt;] sock_close+0x27/0x2b
       [&lt;ffffffff81129c63&gt;] fput+0x11d/0x1e3
       [&lt;ffffffff81126577&gt;] filp_close+0x70/0x7b
       [&lt;ffffffff8112667a&gt;] sys_close+0xf8/0x13d
       [&lt;ffffffff814ae882&gt;] system_call_fastpath+0x16/0x1b

-&gt; #0 (local_softirq_lock){+.+...}:
       [&lt;ffffffff81082ecc&gt;] __lock_acquire+0xacc/0xdc8
       [&lt;ffffffff810836e5&gt;] lock_acquire+0x103/0x12e
       [&lt;ffffffff814a7e40&gt;] _raw_spin_lock+0x3b/0x4a
       [&lt;ffffffff81056d12&gt;] __local_lock+0x25/0x68
       [&lt;ffffffff81056d8b&gt;] local_bh_disable+0x36/0x3b
       [&lt;ffffffff814a7fc4&gt;] _raw_write_lock_bh+0x16/0x4f
       [&lt;ffffffff81433c38&gt;] tcp_close+0x159/0x355
       [&lt;ffffffff81453c99&gt;] inet_release+0xc3/0xcd
       [&lt;ffffffff813dff3f&gt;] sock_release+0x1f/0x74
       [&lt;ffffffff813dffbb&gt;] sock_close+0x27/0x2b
       [&lt;ffffffff81129c63&gt;] fput+0x11d/0x1e3
       [&lt;ffffffff81126577&gt;] filp_close+0x70/0x7b
       [&lt;ffffffff8112667a&gt;] sys_close+0xf8/0x13d
       [&lt;ffffffff814ae882&gt;] system_call_fastpath+0x16/0x1b

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(sk_lock-AF_INET);
                               lock(local_softirq_lock);
                               lock(sk_lock-AF_INET);
  lock(local_softirq_lock);

 *** DEADLOCK ***

1 lock held by ip/1104:
 #0:  (sk_lock-AF_INET){+.+...}, at: [&lt;ffffffff81433308&gt;] lock_sock+0x10/0x12

stack backtrace:
Pid: 1104, comm: ip Not tainted 3.0.0-rc3+ #26
Call Trace:
 [&lt;ffffffff81081649&gt;] print_circular_bug+0x1f8/0x209
 [&lt;ffffffff81082ecc&gt;] __lock_acquire+0xacc/0xdc8
 [&lt;ffffffff81056d12&gt;] ? __local_lock+0x25/0x68
 [&lt;ffffffff810836e5&gt;] lock_acquire+0x103/0x12e
 [&lt;ffffffff81056d12&gt;] ? __local_lock+0x25/0x68
 [&lt;ffffffff81046c75&gt;] ? get_parent_ip+0x11/0x41
 [&lt;ffffffff814a7e40&gt;] _raw_spin_lock+0x3b/0x4a
 [&lt;ffffffff81056d12&gt;] ? __local_lock+0x25/0x68
 [&lt;ffffffff81046c8c&gt;] ? get_parent_ip+0x28/0x41
 [&lt;ffffffff81056d12&gt;] __local_lock+0x25/0x68
 [&lt;ffffffff81056d8b&gt;] local_bh_disable+0x36/0x3b
 [&lt;ffffffff81433308&gt;] ? lock_sock+0x10/0x12
 [&lt;ffffffff814a7fc4&gt;] _raw_write_lock_bh+0x16/0x4f
 [&lt;ffffffff81433c38&gt;] tcp_close+0x159/0x355
 [&lt;ffffffff81453c99&gt;] inet_release+0xc3/0xcd
 [&lt;ffffffff813dff3f&gt;] sock_release+0x1f/0x74
 [&lt;ffffffff813dffbb&gt;] sock_close+0x27/0x2b
 [&lt;ffffffff81129c63&gt;] fput+0x11d/0x1e3
 [&lt;ffffffff81126577&gt;] filp_close+0x70/0x7b
 [&lt;ffffffff8112667a&gt;] sys_close+0xf8/0x13d
 [&lt;ffffffff814ae882&gt;] system_call_fastpath+0x16/0x1b


Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
=======================================================
[ INFO: possible circular locking dependency detected ]
3.0.0-rc3+ #26
-------------------------------------------------------
ip/1104 is trying to acquire lock:
 (local_softirq_lock){+.+...}, at: [&lt;ffffffff81056d12&gt;] __local_lock+0x25/0x68

but task is already holding lock:
 (sk_lock-AF_INET){+.+...}, at: [&lt;ffffffff81433308&gt;] lock_sock+0x10/0x12

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-&gt; #1 (sk_lock-AF_INET){+.+...}:
       [&lt;ffffffff810836e5&gt;] lock_acquire+0x103/0x12e
       [&lt;ffffffff813e2781&gt;] lock_sock_nested+0x82/0x92
       [&lt;ffffffff81433308&gt;] lock_sock+0x10/0x12
       [&lt;ffffffff81433afa&gt;] tcp_close+0x1b/0x355
       [&lt;ffffffff81453c99&gt;] inet_release+0xc3/0xcd
       [&lt;ffffffff813dff3f&gt;] sock_release+0x1f/0x74
       [&lt;ffffffff813dffbb&gt;] sock_close+0x27/0x2b
       [&lt;ffffffff81129c63&gt;] fput+0x11d/0x1e3
       [&lt;ffffffff81126577&gt;] filp_close+0x70/0x7b
       [&lt;ffffffff8112667a&gt;] sys_close+0xf8/0x13d
       [&lt;ffffffff814ae882&gt;] system_call_fastpath+0x16/0x1b

-&gt; #0 (local_softirq_lock){+.+...}:
       [&lt;ffffffff81082ecc&gt;] __lock_acquire+0xacc/0xdc8
       [&lt;ffffffff810836e5&gt;] lock_acquire+0x103/0x12e
       [&lt;ffffffff814a7e40&gt;] _raw_spin_lock+0x3b/0x4a
       [&lt;ffffffff81056d12&gt;] __local_lock+0x25/0x68
       [&lt;ffffffff81056d8b&gt;] local_bh_disable+0x36/0x3b
       [&lt;ffffffff814a7fc4&gt;] _raw_write_lock_bh+0x16/0x4f
       [&lt;ffffffff81433c38&gt;] tcp_close+0x159/0x355
       [&lt;ffffffff81453c99&gt;] inet_release+0xc3/0xcd
       [&lt;ffffffff813dff3f&gt;] sock_release+0x1f/0x74
       [&lt;ffffffff813dffbb&gt;] sock_close+0x27/0x2b
       [&lt;ffffffff81129c63&gt;] fput+0x11d/0x1e3
       [&lt;ffffffff81126577&gt;] filp_close+0x70/0x7b
       [&lt;ffffffff8112667a&gt;] sys_close+0xf8/0x13d
       [&lt;ffffffff814ae882&gt;] system_call_fastpath+0x16/0x1b

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(sk_lock-AF_INET);
                               lock(local_softirq_lock);
                               lock(sk_lock-AF_INET);
  lock(local_softirq_lock);

 *** DEADLOCK ***

1 lock held by ip/1104:
 #0:  (sk_lock-AF_INET){+.+...}, at: [&lt;ffffffff81433308&gt;] lock_sock+0x10/0x12

stack backtrace:
Pid: 1104, comm: ip Not tainted 3.0.0-rc3+ #26
Call Trace:
 [&lt;ffffffff81081649&gt;] print_circular_bug+0x1f8/0x209
 [&lt;ffffffff81082ecc&gt;] __lock_acquire+0xacc/0xdc8
 [&lt;ffffffff81056d12&gt;] ? __local_lock+0x25/0x68
 [&lt;ffffffff810836e5&gt;] lock_acquire+0x103/0x12e
 [&lt;ffffffff81056d12&gt;] ? __local_lock+0x25/0x68
 [&lt;ffffffff81046c75&gt;] ? get_parent_ip+0x11/0x41
 [&lt;ffffffff814a7e40&gt;] _raw_spin_lock+0x3b/0x4a
 [&lt;ffffffff81056d12&gt;] ? __local_lock+0x25/0x68
 [&lt;ffffffff81046c8c&gt;] ? get_parent_ip+0x28/0x41
 [&lt;ffffffff81056d12&gt;] __local_lock+0x25/0x68
 [&lt;ffffffff81056d8b&gt;] local_bh_disable+0x36/0x3b
 [&lt;ffffffff81433308&gt;] ? lock_sock+0x10/0x12
 [&lt;ffffffff814a7fc4&gt;] _raw_write_lock_bh+0x16/0x4f
 [&lt;ffffffff81433c38&gt;] tcp_close+0x159/0x355
 [&lt;ffffffff81453c99&gt;] inet_release+0xc3/0xcd
 [&lt;ffffffff813dff3f&gt;] sock_release+0x1f/0x74
 [&lt;ffffffff813dffbb&gt;] sock_close+0x27/0x2b
 [&lt;ffffffff81129c63&gt;] fput+0x11d/0x1e3
 [&lt;ffffffff81126577&gt;] filp_close+0x70/0x7b
 [&lt;ffffffff8112667a&gt;] sys_close+0xf8/0x13d
 [&lt;ffffffff814ae882&gt;] system_call_fastpath+0x16/0x1b


Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>gro: more generic L2 header check</title>
<updated>2012-03-01T00:31:04+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-02-08T08:51:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=156f251f74fc547065adc2aef8955f70f3237a71'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ 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;
</pre>
</div>
</content>
</entry>
<entry>
<title>netpoll: netpoll_poll_dev() should access dev-&gt;flags</title>
<updated>2012-03-01T00:30:58+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-02-14T10:11:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=39994fb222e62650dc945af466f15f0696f9db7b'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ 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;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: reintroduce missing rcu_assign_pointer() calls</title>
<updated>2012-02-03T17:22:20+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-01-12T04:41:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4704f3edfdd3cc5918932577373c0dc165d52959'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ 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;
</pre>
</div>
</content>
</entry>
<entry>
<title>netns: fix net_alloc_generic()</title>
<updated>2012-02-03T17:22:17+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2012-01-26T00:41:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a2c82f7bee1ffa9eafa1fb0bd886a7eea8c9e497'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ 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;
</pre>
</div>
</content>
</entry>
</feed>
