<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/net, branch v3.8.7</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.8.7</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.8.7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2013-04-12T16:52:12+00:00</updated>
<entry>
<title>can: gw: use kmem_cache_free() instead of kfree()</title>
<updated>2013-04-12T16:52:12+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yongjun_wei@trendmicro.com.cn</email>
</author>
<published>2013-04-09T06:16:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=afe4e1436f37d43bc90442f6829685e6e8322ca8'/>
<id>urn:sha1:afe4e1436f37d43bc90442f6829685e6e8322ca8</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>SUNRPC: Remove extra xprt_put()</title>
<updated>2013-04-12T16:52:09+00:00</updated>
<author>
<name>Chuck Lever</name>
<email>chuck.lever@oracle.com</email>
</author>
<published>2013-03-22T16:52:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=020dff84998201602ae4d00bd38acafc62f5c693'/>
<id>urn:sha1:020dff84998201602ae4d00bd38acafc62f5c693</id>
<content type='text'>
commit a58e0be6f6b3eb2079b0b8fedc9df6fa86869f1e upstream.

While testing error cases where rpc_new_client() fails, I saw
some oopses.

If rpc_new_client() fails, it already invokes xprt_put().  Thus
__rpc_clone_client() does not need to invoke it again.

Introduced by commit 1b63a751 "SUNRPC: Refactor rpc_clone_client()"
Fri Sep 14, 2012.

Signed-off-by: Chuck Lever &lt;chuck.lever@oracle.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mac80211: fix remain-on-channel cancel crash</title>
<updated>2013-04-12T16:52:07+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2013-03-25T10:51:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5c4a5a843043493ee5ddd9978517c4357a7245ee'/>
<id>urn:sha1:5c4a5a843043493ee5ddd9978517c4357a7245ee</id>
<content type='text'>
commit 3fbd45ca8d1c98f3c2582ef8bc70ade42f70947b upstream.

If a ROC item is canceled just as it expires, the work
struct may be scheduled while it is running (and waiting
for the mutex). This results in it being run after being
freed, which obviously crashes.

To fix this don't free it when aborting is requested but
instead mark it as "to be freed", which makes the work a
no-op and allows freeing it outside.

Reported-by: Jouni Malinen &lt;j@w1.fi&gt;
Tested-by: Jouni Malinen &lt;j@w1.fi&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>net: fq_codel: Fix off-by-one error</title>
<updated>2013-04-05T16:26:19+00:00</updated>
<author>
<name>Vijay Subramanian</name>
<email>subramanian.vijay@gmail.com</email>
</author>
<published>2013-03-28T13:52:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fd7016c4656e5f83853bed6f2d84bd61368a7b02'/>
<id>urn:sha1:fd7016c4656e5f83853bed6f2d84bd61368a7b02</id>
<content type='text'>
[ Upstream commit cd68ddd4c29ab523440299f24ff2417fe7a0dca6 ]

Currently, we hold a max of sch-&gt;limit -1 number of packets instead of
sch-&gt;limit packets. Fix this off-by-one error.

Signed-off-by: Vijay Subramanian &lt;subramanian.vijay@gmail.com&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>net: fix the use of this_cpu_ptr</title>
<updated>2013-04-05T16:26:19+00:00</updated>
<author>
<name>Li RongQing</name>
<email>roy.qing.li@gmail.com</email>
</author>
<published>2013-03-27T23:42:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f6c504f9d65d9febc7b4b03d5a1428757e99e9d'/>
<id>urn:sha1:0f6c504f9d65d9febc7b4b03d5a1428757e99e9d</id>
<content type='text'>
[ Upstream commit 50eab0503a7579ada512e4968738b7c9737cf36e ]

flush_tasklet is not percpu var, and percpu is percpu var, and
	this_cpu_ptr(&amp;info-&gt;cache-&gt;percpu-&gt;flush_tasklet)
is not equal to
	&amp;this_cpu_ptr(info-&gt;cache-&gt;percpu)-&gt;flush_tasklet

1f743b076(use this_cpu_ptr per-cpu helper) introduced this bug.

Signed-off-by: Li RongQing &lt;roy.qing.li@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>net: add a synchronize_net() in netdev_rx_handler_unregister()</title>
<updated>2013-04-05T16:26:19+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2013-03-29T03:01:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=09269638aab0f527678426fe9258b384fe6bb103'/>
<id>urn:sha1:09269638aab0f527678426fe9258b384fe6bb103</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-05T16:26:19+00:00</updated>
<author>
<name>Hannes Frederic Sowa</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2013-03-26T08:13:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c3b57ba21bf0a1fe812424c51ea9229d9070ff6a'/>
<id>urn:sha1:c3b57ba21bf0a1fe812424c51ea9229d9070ff6a</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: don't accept multicast traffic with scope 0</title>
<updated>2013-04-05T16:26:19+00:00</updated>
<author>
<name>Hannes Frederic Sowa</name>
<email>hannes@stressinduktion.org</email>
</author>
<published>2013-02-10T05:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=be0013681e301ab076b472f46de5afb1407b756c'/>
<id>urn:sha1:be0013681e301ab076b472f46de5afb1407b756c</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>ipv6: fix bad free of addrconf_init_net</title>
<updated>2013-04-05T16:26:18+00:00</updated>
<author>
<name>Hong Zhiguo</name>
<email>honkiko@gmail.com</email>
</author>
<published>2013-03-25T17:52:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5744c50a8b8aa1c2f1bd924f592e329dbad0518f'/>
<id>urn:sha1:5744c50a8b8aa1c2f1bd924f592e329dbad0518f</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>unix: fix a race condition in unix_release()</title>
<updated>2013-04-05T16:26:17+00:00</updated>
<author>
<name>Paul Moore</name>
<email>pmoore@redhat.com</email>
</author>
<published>2013-03-25T03:18:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9d7a1a25337ad50e9619685550e0b016ce23ddef'/>
<id>urn:sha1:9d7a1a25337ad50e9619685550e0b016ce23ddef</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>
</feed>
