<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/net, branch v3.4.40</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.4.40</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.4.40'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-04-12T16:38:47Z</updated>
<entry>
<title>can: gw: use kmem_cache_free() instead of kfree()</title>
<updated>2013-04-12T16:38:47Z</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2013-04-09T06:16:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=91c1bf8376b6536d98b1b5baa45aea151067fe7b'/>
<id>urn:sha1:91c1bf8376b6536d98b1b5baa45aea151067fe7b</id>
<content type='text'>
commit 3480a2125923e4b7a56d79efc76743089bf273fc upstream.

Memory allocated by kmem_cache_alloc() should be freed using
kmem_cache_free(), not kfree().

Signed-off-by: Wei Yongjun &lt;yongjun_wei@trendmicro.com.cn&gt;
Acked-by: Oliver Hartkopp &lt;socketcan@hartkopp.net&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>net: add a synchronize_net() in netdev_rx_handler_unregister()</title>
<updated>2013-04-05T17:04:47Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2013-03-29T03:01:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f0180de2669df4b9e83a37417369ae7ef7cb71ff'/>
<id>urn:sha1:f0180de2669df4b9e83a37417369ae7ef7cb71ff</id>
<content type='text'>
[ Upstream commit 00cfec37484761a44a3b6f4675a54caa618210ae ]

commit 35d48903e97819 (bonding: fix rx_handler locking) added a race
in bonding driver, reported by Steven Rostedt who did a very good
diagnosis :

&lt;quoting Steven&gt;

I'm currently debugging a crash in an old 3.0-rt kernel that one of our
customers is seeing. The bug happens with a stress test that loads and
unloads the bonding module in a loop (I don't know all the details as
I'm not the one that is directly interacting with the customer). But the
bug looks to be something that may still be present and possibly present
in mainline too. It will just be much harder to trigger it in mainline.

In -rt, interrupts are threads, and can schedule in and out just like
any other thread. Note, mainline now supports interrupt threads so this
may be easily reproducible in mainline as well. I don't have the ability
to tell the customer to try mainline or other kernels, so my hands are
somewhat tied to what I can do.

But according to a core dump, I tracked down that the eth irq thread
crashed in bond_handle_frame() here:

        slave = bond_slave_get_rcu(skb-&gt;dev);
        bond = slave-&gt;bond; &lt;--- BUG

the slave returned was NULL and accessing slave-&gt;bond caused a NULL
pointer dereference.

Looking at the code that unregisters the handler:

void netdev_rx_handler_unregister(struct net_device *dev)
{

        ASSERT_RTNL();
        RCU_INIT_POINTER(dev-&gt;rx_handler, NULL);
        RCU_INIT_POINTER(dev-&gt;rx_handler_data, NULL);
}

Which is basically:
        dev-&gt;rx_handler = NULL;
        dev-&gt;rx_handler_data = NULL;

And looking at __netif_receive_skb() we have:

        rx_handler = rcu_dereference(skb-&gt;dev-&gt;rx_handler);
        if (rx_handler) {
                if (pt_prev) {
                        ret = deliver_skb(skb, pt_prev, orig_dev);
                        pt_prev = NULL;
                }
                switch (rx_handler(&amp;skb)) {

My question to all of you is, what stops this interrupt from happening
while the bonding module is unloading?  What happens if the interrupt
triggers and we have this:

        CPU0                    CPU1
        ----                    ----
  rx_handler = skb-&gt;dev-&gt;rx_handler

                        netdev_rx_handler_unregister() {
                           dev-&gt;rx_handler = NULL;
                           dev-&gt;rx_handler_data = NULL;

  rx_handler()
   bond_handle_frame() {
    slave = skb-&gt;dev-&gt;rx_handler;
    bond = slave-&gt;bond; &lt;-- NULL pointer dereference!!!

What protection am I missing in the bond release handler that would
prevent the above from happening?

&lt;/quoting Steven&gt;

We can fix bug this in two ways. First is adding a test in
bond_handle_frame() and others to check if rx_handler_data is NULL.

A second way is adding a synchronize_net() in
netdev_rx_handler_unregister() to make sure that a rcu protected reader
has the guarantee to see a non NULL rx_handler_data.

The second way is better as it avoids an extra test in fast path.

Reported-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Jiri Pirko &lt;jpirko@redhat.com&gt;
Cc: Paul E. McKenney &lt;paulmck@us.ibm.com&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Reviewed-by: 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>ipv6: don't accept node local multicast traffic from the wire</title>
<updated>2013-04-05T17:04:41Z</updated>
<author>
<name>Hannes Frederic Sowa</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2013-03-26T08:13:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=567a4ac4b7d48e186a28168e40388503d5b7eb01'/>
<id>urn:sha1:567a4ac4b7d48e186a28168e40388503d5b7eb01</id>
<content type='text'>
[ Upstream commit 1c4a154e5253687c51123956dfcee9e9dfa8542d ]

Erik Hugne's errata proposal (Errata ID: 3480) to RFC4291 has been
verified: http://www.rfc-editor.org/errata_search.php?eid=3480

We have to check for pkt_type and loopback flag because either the
packets are allowed to travel over the loopback interface (in which case
pkt_type is PACKET_HOST and IFF_LOOPBACK flag is set) or they travel
over a non-loopback interface back to us (in which case PACKET_TYPE is
PACKET_LOOPBACK and IFF_LOOPBACK flag is not set).

Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Cc: Erik Hugne &lt;erik.hugne@ericsson.com&gt;
Cc: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.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>ipv6: fix bad free of addrconf_init_net</title>
<updated>2013-04-05T17:04:41Z</updated>
<author>
<name>Hong Zhiguo</name>
<email>honkiko@gmail.com</email>
</author>
<published>2013-03-25T17:52:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6a519979f9787fc326fd58dce983dda1cdf215dc'/>
<id>urn:sha1:6a519979f9787fc326fd58dce983dda1cdf215dc</id>
<content type='text'>
[ Upstream commit a79ca223e029aa4f09abb337accf1812c900a800 ]

Signed-off-by: Hong Zhiguo &lt;honkiko@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>ipv6: don't accept multicast traffic with scope 0</title>
<updated>2013-04-05T17:04:41Z</updated>
<author>
<name>Hannes Frederic Sowa</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2013-02-10T05:35:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=df19106f4574ba16d8575bbc206573f53cf1f4a9'/>
<id>urn:sha1:df19106f4574ba16d8575bbc206573f53cf1f4a9</id>
<content type='text'>
[ Upstream commit 20314092c1b41894d8c181bf9aa6f022be2416aa ]

v2:
a) moved before multicast source address check
b) changed comment to netdev style

Acked-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Cc: Erik Hugne &lt;erik.hugne@ericsson.com&gt;
Cc: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.org&gt;
Signed-off-by: Hannes Frederic Sowa &lt;hannes@stressinduktion.org&gt;
Acked-by: YOSHIFUJI Hideaki &lt;yoshfuji@linux-ipv6.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>unix: fix a race condition in unix_release()</title>
<updated>2013-04-05T17:04:39Z</updated>
<author>
<name>Paul Moore</name>
<email>pmoore@redhat.com</email>
</author>
<published>2013-03-25T03:18:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fbb7347e856f5116114c3ef5945980a3afab121e'/>
<id>urn:sha1:fbb7347e856f5116114c3ef5945980a3afab121e</id>
<content type='text'>
[ Upstream commit ded34e0fe8fe8c2d595bfa30626654e4b87621e0 ]

As reported by Jan, and others over the past few years, there is a
race condition caused by unix_release setting the sock-&gt;sk pointer
to NULL before properly marking the socket as dead/orphaned.  This
can cause a problem with the LSM hook security_unix_may_send() if
there is another socket attempting to write to this partially
released socket in between when sock-&gt;sk is set to NULL and it is
marked as dead/orphaned.  This patch fixes this by only setting
sock-&gt;sk to NULL after the socket has been marked as dead; I also
take the opportunity to make unix_release_sock() a void function
as it only ever returned 0/success.

Dave, I think this one should go on the -stable pile.

Special thanks to Jan for coming up with a reproducer for this
problem.

Reported-by: Jan Stancek &lt;jan.stancek@gmail.com&gt;
Signed-off-by: Paul Moore &lt;pmoore@redhat.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>thermal: shorten too long mcast group name</title>
<updated>2013-04-05T17:04:38Z</updated>
<author>
<name>Masatake YAMATO</name>
<email>yamato@redhat.com</email>
</author>
<published>2013-04-01T18:50:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b9f3bf1d0fe1e9ef11d1d607906138e9f84f7616'/>
<id>urn:sha1:b9f3bf1d0fe1e9ef11d1d607906138e9f84f7616</id>
<content type='text'>
[ Upstream commits 73214f5d9f33b79918b1f7babddd5c8af28dd23d
  and f1e79e208076ffe7bad97158275f1c572c04f5c7, the latter
  adds an assertion to genetlink to prevent this from happening
  again in the future. ]

The original name is too long.

Signed-off-by: Masatake YAMATO &lt;yamato@redhat.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>8021q: fix a potential use-after-free</title>
<updated>2013-04-05T17:04:38Z</updated>
<author>
<name>Cong Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2013-03-22T19:14:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a83417946df6c57fbb4d4383c992c5ffd59b56c2'/>
<id>urn:sha1:a83417946df6c57fbb4d4383c992c5ffd59b56c2</id>
<content type='text'>
[ Upstream commit 4a7df340ed1bac190c124c1601bfc10cde9fb4fb ]

vlan_vid_del() could possibly free -&gt;vlan_info after a RCU grace
period, however, we may still refer to the freed memory area
by 'grp' pointer. Found by code inspection.

This patch moves vlan_vid_del() as behind as possible.

Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
Cc: Patrick McHardy &lt;kaber@trash.net&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Acked-by: Eric Dumazet &lt;edumazet@google.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>tcp: undo spurious timeout after SACK reneging</title>
<updated>2013-04-05T17:04:38Z</updated>
<author>
<name>Yuchung Cheng</name>
<email>ycheng@google.com</email>
</author>
<published>2013-03-24T10:42:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d1f60c6d91df21978218af4f5442993749ecbf7e'/>
<id>urn:sha1:d1f60c6d91df21978218af4f5442993749ecbf7e</id>
<content type='text'>
[ Upstream commit 7ebe183c6d444ef5587d803b64a1f4734b18c564 ]

On SACK reneging the sender immediately retransmits and forces a
timeout but disables Eifel (undo). If the (buggy) receiver does not
drop any packet this can trigger a false slow-start retransmit storm
driven by the ACKs of the original packets. This can be detected with
undo and TCP timestamps.

Signed-off-by: Yuchung Cheng &lt;ycheng@google.com&gt;
Acked-by: Neal Cardwell &lt;ncardwell@google.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>tcp: preserve ACK clocking in TSO</title>
<updated>2013-04-05T17:04:38Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2013-03-21T17:36:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=21b56e0f081f321334ef90d0d4ebe95e79d70a46'/>
<id>urn:sha1:21b56e0f081f321334ef90d0d4ebe95e79d70a46</id>
<content type='text'>
[ Upstream commit f4541d60a449afd40448b06496dcd510f505928e ]

A long standing problem with TSO is the fact that tcp_tso_should_defer()
rearms the deferred timer, while it should not.

Current code leads to following bad bursty behavior :

20:11:24.484333 IP A &gt; B: . 297161:316921(19760) ack 1 win 119
20:11:24.484337 IP B &gt; A: . ack 263721 win 1117
20:11:24.485086 IP B &gt; A: . ack 265241 win 1117
20:11:24.485925 IP B &gt; A: . ack 266761 win 1117
20:11:24.486759 IP B &gt; A: . ack 268281 win 1117
20:11:24.487594 IP B &gt; A: . ack 269801 win 1117
20:11:24.488430 IP B &gt; A: . ack 271321 win 1117
20:11:24.489267 IP B &gt; A: . ack 272841 win 1117
20:11:24.490104 IP B &gt; A: . ack 274361 win 1117
20:11:24.490939 IP B &gt; A: . ack 275881 win 1117
20:11:24.491775 IP B &gt; A: . ack 277401 win 1117
20:11:24.491784 IP A &gt; B: . 316921:332881(15960) ack 1 win 119
20:11:24.492620 IP B &gt; A: . ack 278921 win 1117
20:11:24.493448 IP B &gt; A: . ack 280441 win 1117
20:11:24.494286 IP B &gt; A: . ack 281961 win 1117
20:11:24.495122 IP B &gt; A: . ack 283481 win 1117
20:11:24.495958 IP B &gt; A: . ack 285001 win 1117
20:11:24.496791 IP B &gt; A: . ack 286521 win 1117
20:11:24.497628 IP B &gt; A: . ack 288041 win 1117
20:11:24.498459 IP B &gt; A: . ack 289561 win 1117
20:11:24.499296 IP B &gt; A: . ack 291081 win 1117
20:11:24.500133 IP B &gt; A: . ack 292601 win 1117
20:11:24.500970 IP B &gt; A: . ack 294121 win 1117
20:11:24.501388 IP B &gt; A: . ack 295641 win 1117
20:11:24.501398 IP A &gt; B: . 332881:351881(19000) ack 1 win 119

While the expected behavior is more like :

20:19:49.259620 IP A &gt; B: . 197601:202161(4560) ack 1 win 119
20:19:49.260446 IP B &gt; A: . ack 154281 win 1212
20:19:49.261282 IP B &gt; A: . ack 155801 win 1212
20:19:49.262125 IP B &gt; A: . ack 157321 win 1212
20:19:49.262136 IP A &gt; B: . 202161:206721(4560) ack 1 win 119
20:19:49.262958 IP B &gt; A: . ack 158841 win 1212
20:19:49.263795 IP B &gt; A: . ack 160361 win 1212
20:19:49.264628 IP B &gt; A: . ack 161881 win 1212
20:19:49.264637 IP A &gt; B: . 206721:211281(4560) ack 1 win 119
20:19:49.265465 IP B &gt; A: . ack 163401 win 1212
20:19:49.265886 IP B &gt; A: . ack 164921 win 1212
20:19:49.266722 IP B &gt; A: . ack 166441 win 1212
20:19:49.266732 IP A &gt; B: . 211281:215841(4560) ack 1 win 119
20:19:49.267559 IP B &gt; A: . ack 167961 win 1212
20:19:49.268394 IP B &gt; A: . ack 169481 win 1212
20:19:49.269232 IP B &gt; A: . ack 171001 win 1212
20:19:49.269241 IP A &gt; B: . 215841:221161(5320) ack 1 win 119

Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Yuchung Cheng &lt;ycheng@google.com&gt;
Cc: Van Jacobson &lt;vanj@google.com&gt;
Cc: Neal Cardwell &lt;ncardwell@google.com&gt;
Cc: Nandita Dukkipati &lt;nanditad@google.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>
