<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net, branch v3.14.28</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>mac80211: free management frame keys when removing station</title>
<updated>2015-01-08T18:00:49+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2014-12-17T12:55:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=194172f158878ee1008cd8d244f1378b9649776e'/>
<id>194172f158878ee1008cd8d244f1378b9649776e</id>
<content type='text'>
commit 28a9bc68124c319b2b3dc861e80828a8865fd1ba upstream.

When writing the code to allow per-station GTKs, I neglected to
take into account the management frame keys (index 4 and 5) when
freeing the station and only added code to free the first four
data frame keys.

Fix this by iterating the array of keys over the right length.

Fixes: e31b82136d1a ("cfg80211/mac80211: allow per-station GTKs")
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&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>
commit 28a9bc68124c319b2b3dc861e80828a8865fd1ba upstream.

When writing the code to allow per-station GTKs, I neglected to
take into account the management frame keys (index 4 and 5) when
freeing the station and only added code to free the first four
data frame keys.

Fix this by iterating the array of keys over the right length.

Fixes: e31b82136d1a ("cfg80211/mac80211: allow per-station GTKs")
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: fix multicast LED blinking and counter</title>
<updated>2015-01-08T18:00:49+00:00</updated>
<author>
<name>Andreas Müller</name>
<email>goo@stapelspeicher.org</email>
</author>
<published>2014-12-12T11:11:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=57caf9bdf9d529e0c1100a0d04dc60e63d8472b1'/>
<id>57caf9bdf9d529e0c1100a0d04dc60e63d8472b1</id>
<content type='text'>
commit d025933e29872cb1fe19fc54d80e4dfa4ee5779c upstream.

As multicast-frames can't be fragmented, "dot11MulticastReceivedFrameCount"
stopped being incremented after the use-after-free fix. Furthermore, the
RX-LED will be triggered by every multicast frame (which wouldn't happen
before) which wouldn't allow the LED to rest at all.

Fixes https://bugzilla.kernel.org/show_bug.cgi?id=89431 which also had the
patch.

Fixes: b8fff407a180 ("mac80211: fix use-after-free in defragmentation")
Signed-off-by: Andreas Müller &lt;goo@stapelspeicher.org&gt;
[rewrite commit message]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&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>
commit d025933e29872cb1fe19fc54d80e4dfa4ee5779c upstream.

As multicast-frames can't be fragmented, "dot11MulticastReceivedFrameCount"
stopped being incremented after the use-after-free fix. Furthermore, the
RX-LED will be triggered by every multicast frame (which wouldn't happen
before) which wouldn't allow the LED to rest at all.

Fixes https://bugzilla.kernel.org/show_bug.cgi?id=89431 which also had the
patch.

Fixes: b8fff407a180 ("mac80211: fix use-after-free in defragmentation")
Signed-off-by: Andreas Müller &lt;goo@stapelspeicher.org&gt;
[rewrite commit message]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: Fix regression that triggers a kernel BUG with CCMP</title>
<updated>2014-12-16T17:34:28+00:00</updated>
<author>
<name>Ronald Wahl</name>
<email>ronald.wahl@raritan.com</email>
</author>
<published>2014-11-06T10:52:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8de0e8d9ab1c72cfbee768a168668c54a2aa5b00'/>
<id>8de0e8d9ab1c72cfbee768a168668c54a2aa5b00</id>
<content type='text'>
commit 4f031fa9f188b2b0641ac20087d9e16bcfb4e49d upstream.

Commit 7ec7c4a9a686c608315739ab6a2b0527a240883c (mac80211: port CCMP to
cryptoapi's CCM driver) introduced a regression when decrypting empty
packets (data_len == 0). This will lead to backtraces like:

(scatterwalk_start) from [&lt;c01312f4&gt;] (scatterwalk_map_and_copy+0x2c/0xa8)
(scatterwalk_map_and_copy) from [&lt;c013a5a0&gt;] (crypto_ccm_decrypt+0x7c/0x25c)
(crypto_ccm_decrypt) from [&lt;c032886c&gt;] (ieee80211_aes_ccm_decrypt+0x160/0x170)
(ieee80211_aes_ccm_decrypt) from [&lt;c031c628&gt;] (ieee80211_crypto_ccmp_decrypt+0x1ac/0x238)
(ieee80211_crypto_ccmp_decrypt) from [&lt;c032ef28&gt;] (ieee80211_rx_handlers+0x870/0x1d24)
(ieee80211_rx_handlers) from [&lt;c0330c7c&gt;] (ieee80211_prepare_and_rx_handle+0x8a0/0x91c)
(ieee80211_prepare_and_rx_handle) from [&lt;c0331260&gt;] (ieee80211_rx+0x568/0x730)
(ieee80211_rx) from [&lt;c01d3054&gt;] (__carl9170_rx+0x94c/0xa20)
(__carl9170_rx) from [&lt;c01d3324&gt;] (carl9170_rx_stream+0x1fc/0x320)
(carl9170_rx_stream) from [&lt;c01cbccc&gt;] (carl9170_usb_tasklet+0x80/0xc8)
(carl9170_usb_tasklet) from [&lt;c00199dc&gt;] (tasklet_hi_action+0x88/0xcc)
(tasklet_hi_action) from [&lt;c00193c8&gt;] (__do_softirq+0xcc/0x200)
(__do_softirq) from [&lt;c0019734&gt;] (irq_exit+0x80/0xe0)
(irq_exit) from [&lt;c0009c10&gt;] (handle_IRQ+0x64/0x80)
(handle_IRQ) from [&lt;c000c3a0&gt;] (__irq_svc+0x40/0x4c)
(__irq_svc) from [&lt;c0009d44&gt;] (arch_cpu_idle+0x2c/0x34)

Such packets can appear for example when using the carl9170 wireless driver
because hardware sometimes generates garbage when the internal FIFO overruns.

This patch adds an additional length check.

Fixes: 7ec7c4a9a686 ("mac80211: port CCMP to cryptoapi's CCM driver")
Acked-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Ronald Wahl &lt;ronald.wahl@raritan.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&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>
commit 4f031fa9f188b2b0641ac20087d9e16bcfb4e49d upstream.

Commit 7ec7c4a9a686c608315739ab6a2b0527a240883c (mac80211: port CCMP to
cryptoapi's CCM driver) introduced a regression when decrypting empty
packets (data_len == 0). This will lead to backtraces like:

(scatterwalk_start) from [&lt;c01312f4&gt;] (scatterwalk_map_and_copy+0x2c/0xa8)
(scatterwalk_map_and_copy) from [&lt;c013a5a0&gt;] (crypto_ccm_decrypt+0x7c/0x25c)
(crypto_ccm_decrypt) from [&lt;c032886c&gt;] (ieee80211_aes_ccm_decrypt+0x160/0x170)
(ieee80211_aes_ccm_decrypt) from [&lt;c031c628&gt;] (ieee80211_crypto_ccmp_decrypt+0x1ac/0x238)
(ieee80211_crypto_ccmp_decrypt) from [&lt;c032ef28&gt;] (ieee80211_rx_handlers+0x870/0x1d24)
(ieee80211_rx_handlers) from [&lt;c0330c7c&gt;] (ieee80211_prepare_and_rx_handle+0x8a0/0x91c)
(ieee80211_prepare_and_rx_handle) from [&lt;c0331260&gt;] (ieee80211_rx+0x568/0x730)
(ieee80211_rx) from [&lt;c01d3054&gt;] (__carl9170_rx+0x94c/0xa20)
(__carl9170_rx) from [&lt;c01d3324&gt;] (carl9170_rx_stream+0x1fc/0x320)
(carl9170_rx_stream) from [&lt;c01cbccc&gt;] (carl9170_usb_tasklet+0x80/0xc8)
(carl9170_usb_tasklet) from [&lt;c00199dc&gt;] (tasklet_hi_action+0x88/0xcc)
(tasklet_hi_action) from [&lt;c00193c8&gt;] (__do_softirq+0xcc/0x200)
(__do_softirq) from [&lt;c0019734&gt;] (irq_exit+0x80/0xe0)
(irq_exit) from [&lt;c0009c10&gt;] (handle_IRQ+0x64/0x80)
(handle_IRQ) from [&lt;c000c3a0&gt;] (__irq_svc+0x40/0x4c)
(__irq_svc) from [&lt;c0009d44&gt;] (arch_cpu_idle+0x2c/0x34)

Such packets can appear for example when using the carl9170 wireless driver
because hardware sometimes generates garbage when the internal FIFO overruns.

This patch adds an additional length check.

Fixes: 7ec7c4a9a686 ("mac80211: port CCMP to cryptoapi's CCM driver")
Acked-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Signed-off-by: Ronald Wahl &lt;ronald.wahl@raritan.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>net: sctp: use MAX_HEADER for headroom reserve in output path</title>
<updated>2014-12-16T17:34:27+00:00</updated>
<author>
<name>Daniel Borkmann</name>
<email>dborkman@redhat.com</email>
</author>
<published>2014-12-03T11:13:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=729ae1da461bbaf1ab1a1a7be7ce60f969a47b54'/>
<id>729ae1da461bbaf1ab1a1a7be7ce60f969a47b54</id>
<content type='text'>
[ Upstream commit 9772b54c55266ce80c639a80aa68eeb908f8ecf5 ]

To accomodate for enough headroom for tunnels, use MAX_HEADER instead
of LL_MAX_HEADER. Robert reported that he has hit after roughly 40hrs
of trinity an skb_under_panic() via SCTP output path (see reference).
I couldn't reproduce it from here, but not using MAX_HEADER as elsewhere
in other protocols might be one possible cause for this.

In any case, it looks like accounting on chunks themself seems to look
good as the skb already passed the SCTP output path and did not hit
any skb_over_panic(). Given tunneling was enabled in his .config, the
headroom would have been expanded by MAX_HEADER in this case.

Reported-by: Robert Święcki &lt;robert@swiecki.net&gt;
Reference: https://lkml.org/lkml/2014/12/1/507
Fixes: 594ccc14dfe4d ("[SCTP] Replace incorrect use of dev_alloc_skb with alloc_skb in sctp_packet_transmit().")
Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.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 9772b54c55266ce80c639a80aa68eeb908f8ecf5 ]

To accomodate for enough headroom for tunnels, use MAX_HEADER instead
of LL_MAX_HEADER. Robert reported that he has hit after roughly 40hrs
of trinity an skb_under_panic() via SCTP output path (see reference).
I couldn't reproduce it from here, but not using MAX_HEADER as elsewhere
in other protocols might be one possible cause for this.

In any case, it looks like accounting on chunks themself seems to look
good as the skb already passed the SCTP output path and did not hit
any skb_over_panic(). Given tunneling was enabled in his .config, the
headroom would have been expanded by MAX_HEADER in this case.

Reported-by: Robert Święcki &lt;robert@swiecki.net&gt;
Reference: https://lkml.org/lkml/2014/12/1/507
Fixes: 594ccc14dfe4d ("[SCTP] Replace incorrect use of dev_alloc_skb with alloc_skb in sctp_packet_transmit().")
Signed-off-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Acked-by: Vlad Yasevich &lt;vyasevich@gmail.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>gre: Set inner mac header in gro complete</title>
<updated>2014-12-16T17:34:27+00:00</updated>
<author>
<name>Tom Herbert</name>
<email>therbert@google.com</email>
</author>
<published>2014-11-29T17:59:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c737a52c8742f427b439d71dfb4ce4e4a2ffc5e6'/>
<id>c737a52c8742f427b439d71dfb4ce4e4a2ffc5e6</id>
<content type='text'>
[ Upstream commit 6fb2a756739aa507c1fd5b8126f0bfc2f070dc46 ]

Set the inner mac header to point to the GRE payload when
doing GRO. This is needed if we proceed to send the packet
through GRE GSO which now uses the inner mac header instead
of inner network header to determine the length of encapsulation
headers.

Fixes: 14051f0452a2 ("gre: Use inner mac length when computing tunnel length")
Reported-by: Wolfgang Walter &lt;linux@stwm.de&gt;
Signed-off-by: Tom Herbert &lt;therbert@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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 6fb2a756739aa507c1fd5b8126f0bfc2f070dc46 ]

Set the inner mac header to point to the GRE payload when
doing GRO. This is needed if we proceed to send the packet
through GRE GSO which now uses the inner mac header instead
of inner network header to determine the length of encapsulation
headers.

Fixes: 14051f0452a2 ("gre: Use inner mac length when computing tunnel length")
Reported-by: Wolfgang Walter &lt;linux@stwm.de&gt;
Signed-off-by: Tom Herbert &lt;therbert@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;
</pre>
</div>
</content>
</entry>
<entry>
<title>rtnetlink: release net refcnt on error in do_setlink()</title>
<updated>2014-12-16T17:34:27+00:00</updated>
<author>
<name>Nicolas Dichtel</name>
<email>nicolas.dichtel@6wind.com</email>
</author>
<published>2014-11-27T09:16:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5ee9f7cf65cd69d61b718eb40a53a9d2e3477827'/>
<id>5ee9f7cf65cd69d61b718eb40a53a9d2e3477827</id>
<content type='text'>
[ Upstream commit e0ebde0e131b529fd721b24f62872def5ec3718c ]

rtnl_link_get_net() holds a reference on the 'struct net', we need to release
it in case of error.

CC: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Fixes: b51642f6d77b ("net: Enable a userns root rtnl calls that are safe for unprivilged users")
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit e0ebde0e131b529fd721b24f62872def5ec3718c ]

rtnl_link_get_net() holds a reference on the 'struct net', we need to release
it in case of error.

CC: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Fixes: b51642f6d77b ("net: Enable a userns root rtnl calls that are safe for unprivilged users")
Signed-off-by: Nicolas Dichtel &lt;nicolas.dichtel@6wind.com&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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipv6: gre: fix wrong skb-&gt;protocol in WCCP</title>
<updated>2014-12-16T17:34:27+00:00</updated>
<author>
<name>Yuri Chislov</name>
<email>yuri.chislov@gmail.com</email>
</author>
<published>2014-11-24T10:25:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f586488c8825e4c1193a76653a89102a8ff8625a'/>
<id>f586488c8825e4c1193a76653a89102a8ff8625a</id>
<content type='text'>
[ Upstream commit be6572fdb1bfbe23b2624d477de50af50b02f5d6 ]

When using GRE redirection in WCCP, it sets the wrong skb-&gt;protocol,
that is, ETH_P_IP instead of ETH_P_IPV6 for the encapuslated traffic.

Fixes: c12b395a4664 ("gre: Support GRE over IPv6")
Cc: Dmitry Kozlov &lt;xeb@mail.ru&gt;
Signed-off-by: Yuri Chislov &lt;yuri.chislov@gmail.com&gt;
Tested-by: Yuri Chislov &lt;yuri.chislov@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;dborkman@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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit be6572fdb1bfbe23b2624d477de50af50b02f5d6 ]

When using GRE redirection in WCCP, it sets the wrong skb-&gt;protocol,
that is, ETH_P_IP instead of ETH_P_IPV6 for the encapuslated traffic.

Fixes: c12b395a4664 ("gre: Support GRE over IPv6")
Cc: Dmitry Kozlov &lt;xeb@mail.ru&gt;
Signed-off-by: Yuri Chislov &lt;yuri.chislov@gmail.com&gt;
Tested-by: Yuri Chislov &lt;yuri.chislov@gmail.com&gt;
Signed-off-by: Daniel Borkmann &lt;dborkman@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;
</pre>
</div>
</content>
</entry>
<entry>
<title>ip_tunnel: the lack of vti_link_ops' dellink() cause kernel panic</title>
<updated>2014-12-16T17:34:27+00:00</updated>
<author>
<name>lucien</name>
<email>lucien.xin@gmail.com</email>
</author>
<published>2014-11-23T07:04:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3358f1a698eea1cb6ca4a96136c7a95db90a0657'/>
<id>3358f1a698eea1cb6ca4a96136c7a95db90a0657</id>
<content type='text'>
[ Upstream commit 20ea60ca9952bd19d4b0d74719daba305aef5178 ]

Now the vti_link_ops do not point the .dellink, for fb tunnel device
(ip_vti0), the net_device will be removed as the default .dellink is
unregister_netdevice_queue,but the tunnel still in the tunnel list,
then if we add a new vti tunnel, in ip_tunnel_find():

        hlist_for_each_entry_rcu(t, head, hash_node) {
                if (local == t-&gt;parms.iph.saddr &amp;&amp;
                    remote == t-&gt;parms.iph.daddr &amp;&amp;
                    link == t-&gt;parms.link &amp;&amp;
==&gt;                 type == t-&gt;dev-&gt;type &amp;&amp;
                    ip_tunnel_key_match(&amp;t-&gt;parms, flags, key))
                        break;
        }

the panic will happen, cause dev of ip_tunnel *t is null:
[ 3835.072977] IP: [&lt;ffffffffa04103fd&gt;] ip_tunnel_find+0x9d/0xc0 [ip_tunnel]
[ 3835.073008] PGD b2c21067 PUD b7277067 PMD 0
[ 3835.073008] Oops: 0000 [#1] SMP
.....
[ 3835.073008] Stack:
[ 3835.073008]  ffff8800b72d77f0 ffffffffa0411924 ffff8800bb956000 ffff8800b72d78e0
[ 3835.073008]  ffff8800b72d78a0 0000000000000000 ffffffffa040d100 ffff8800b72d7858
[ 3835.073008]  ffffffffa040b2e3 0000000000000000 0000000000000000 0000000000000000
[ 3835.073008] Call Trace:
[ 3835.073008]  [&lt;ffffffffa0411924&gt;] ip_tunnel_newlink+0x64/0x160 [ip_tunnel]
[ 3835.073008]  [&lt;ffffffffa040b2e3&gt;] vti_newlink+0x43/0x70 [ip_vti]
[ 3835.073008]  [&lt;ffffffff8150d4da&gt;] rtnl_newlink+0x4fa/0x5f0
[ 3835.073008]  [&lt;ffffffff812f68bb&gt;] ? nla_strlcpy+0x5b/0x70
[ 3835.073008]  [&lt;ffffffff81508fb0&gt;] ? rtnl_link_ops_get+0x40/0x60
[ 3835.073008]  [&lt;ffffffff8150d11f&gt;] ? rtnl_newlink+0x13f/0x5f0
[ 3835.073008]  [&lt;ffffffff81509cf4&gt;] rtnetlink_rcv_msg+0xa4/0x270
[ 3835.073008]  [&lt;ffffffff8126adf5&gt;] ? sock_has_perm+0x75/0x90
[ 3835.073008]  [&lt;ffffffff81509c50&gt;] ? rtnetlink_rcv+0x30/0x30
[ 3835.073008]  [&lt;ffffffff81529e39&gt;] netlink_rcv_skb+0xa9/0xc0
[ 3835.073008]  [&lt;ffffffff81509c48&gt;] rtnetlink_rcv+0x28/0x30
....

modprobe ip_vti
ip link del ip_vti0 type vti
ip link add ip_vti0 type vti
rmmod ip_vti

do that one or more times, kernel will panic.

fix it by assigning ip_tunnel_dellink to vti_link_ops' dellink, in
which we skip the unregister of fb tunnel device. do the same on ip6_vti.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: Cong Wang &lt;cwang@twopensource.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 20ea60ca9952bd19d4b0d74719daba305aef5178 ]

Now the vti_link_ops do not point the .dellink, for fb tunnel device
(ip_vti0), the net_device will be removed as the default .dellink is
unregister_netdevice_queue,but the tunnel still in the tunnel list,
then if we add a new vti tunnel, in ip_tunnel_find():

        hlist_for_each_entry_rcu(t, head, hash_node) {
                if (local == t-&gt;parms.iph.saddr &amp;&amp;
                    remote == t-&gt;parms.iph.daddr &amp;&amp;
                    link == t-&gt;parms.link &amp;&amp;
==&gt;                 type == t-&gt;dev-&gt;type &amp;&amp;
                    ip_tunnel_key_match(&amp;t-&gt;parms, flags, key))
                        break;
        }

the panic will happen, cause dev of ip_tunnel *t is null:
[ 3835.072977] IP: [&lt;ffffffffa04103fd&gt;] ip_tunnel_find+0x9d/0xc0 [ip_tunnel]
[ 3835.073008] PGD b2c21067 PUD b7277067 PMD 0
[ 3835.073008] Oops: 0000 [#1] SMP
.....
[ 3835.073008] Stack:
[ 3835.073008]  ffff8800b72d77f0 ffffffffa0411924 ffff8800bb956000 ffff8800b72d78e0
[ 3835.073008]  ffff8800b72d78a0 0000000000000000 ffffffffa040d100 ffff8800b72d7858
[ 3835.073008]  ffffffffa040b2e3 0000000000000000 0000000000000000 0000000000000000
[ 3835.073008] Call Trace:
[ 3835.073008]  [&lt;ffffffffa0411924&gt;] ip_tunnel_newlink+0x64/0x160 [ip_tunnel]
[ 3835.073008]  [&lt;ffffffffa040b2e3&gt;] vti_newlink+0x43/0x70 [ip_vti]
[ 3835.073008]  [&lt;ffffffff8150d4da&gt;] rtnl_newlink+0x4fa/0x5f0
[ 3835.073008]  [&lt;ffffffff812f68bb&gt;] ? nla_strlcpy+0x5b/0x70
[ 3835.073008]  [&lt;ffffffff81508fb0&gt;] ? rtnl_link_ops_get+0x40/0x60
[ 3835.073008]  [&lt;ffffffff8150d11f&gt;] ? rtnl_newlink+0x13f/0x5f0
[ 3835.073008]  [&lt;ffffffff81509cf4&gt;] rtnetlink_rcv_msg+0xa4/0x270
[ 3835.073008]  [&lt;ffffffff8126adf5&gt;] ? sock_has_perm+0x75/0x90
[ 3835.073008]  [&lt;ffffffff81509c50&gt;] ? rtnetlink_rcv+0x30/0x30
[ 3835.073008]  [&lt;ffffffff81529e39&gt;] netlink_rcv_skb+0xa9/0xc0
[ 3835.073008]  [&lt;ffffffff81509c48&gt;] rtnetlink_rcv+0x28/0x30
....

modprobe ip_vti
ip link del ip_vti0 type vti
ip link add ip_vti0 type vti
rmmod ip_vti

do that one or more times, kernel will panic.

fix it by assigning ip_tunnel_dellink to vti_link_ops' dellink, in
which we skip the unregister of fb tunnel device. do the same on ip6_vti.

Signed-off-by: Xin Long &lt;lucien.xin@gmail.com&gt;
Signed-off-by: Cong Wang &lt;cwang@twopensource.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>batman: fix a bogus warning from batadv_is_on_batman_iface()</title>
<updated>2014-12-06T23:55:39+00:00</updated>
<author>
<name>Cong Wang</name>
<email>cwang@twopensource.com</email>
</author>
<published>2014-05-22T18:57:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5376f5d39c51b6ed6d787095729464000c9d35e8'/>
<id>5376f5d39c51b6ed6d787095729464000c9d35e8</id>
<content type='text'>
commit b6ed5498601df40489606dbc14a9c7011c16630b upstream.

batman tries to search dev-&gt;iflink to check if it's a batman interface,
but -&gt;iflink could be 0, which is not a valid ifindex. It should just
avoid iflink == 0 case.

Reported-by: Jet Chen &lt;jet.chen@intel.com&gt;
Tested-by: Jet Chen &lt;jet.chen@intel.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Cc: Antonio Quartulli &lt;antonio@open-mesh.com&gt;
Cc: Marek Lindner &lt;mareklindner@neomailbox.ch&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: Cong Wang &lt;cwang@twopensource.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>
commit b6ed5498601df40489606dbc14a9c7011c16630b upstream.

batman tries to search dev-&gt;iflink to check if it's a batman interface,
but -&gt;iflink could be 0, which is not a valid ifindex. It should just
avoid iflink == 0 case.

Reported-by: Jet Chen &lt;jet.chen@intel.com&gt;
Tested-by: Jet Chen &lt;jet.chen@intel.com&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Cc: Antonio Quartulli &lt;antonio@open-mesh.com&gt;
Cc: Marek Lindner &lt;mareklindner@neomailbox.ch&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Signed-off-by: Cong Wang &lt;cwang@twopensource.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/ping: handle protocol mismatching scenario</title>
<updated>2014-12-06T23:55:39+00:00</updated>
<author>
<name>Jane Zhou</name>
<email>a17711@motorola.com</email>
</author>
<published>2014-11-24T19:44:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5b6493aed77f5107213149498a304c713f96cc1d'/>
<id>5b6493aed77f5107213149498a304c713f96cc1d</id>
<content type='text'>
commit 91a0b603469069cdcce4d572b7525ffc9fd352a6 upstream.

ping_lookup() may return a wrong sock if sk_buff's and sock's protocols
dont' match. For example, sk_buff's protocol is ETH_P_IPV6, but sock's
sk_family is AF_INET, in that case, if sk-&gt;sk_bound_dev_if is zero, a wrong
sock will be returned.
the fix is to "continue" the searching, if no matching, return NULL.

Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Alexey Kuznetsov &lt;kuznet@ms2.inr.ac.ru&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: Hideaki YOSHIFUJI &lt;yoshfuji@linux-ipv6.org&gt;
Cc: Patrick McHardy &lt;kaber@trash.net&gt;
Cc: netdev@vger.kernel.org
Signed-off-by: Jane Zhou &lt;a17711@motorola.com&gt;
Signed-off-by: Yiwei Zhao &lt;gbjc64@motorola.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>
commit 91a0b603469069cdcce4d572b7525ffc9fd352a6 upstream.

ping_lookup() may return a wrong sock if sk_buff's and sock's protocols
dont' match. For example, sk_buff's protocol is ETH_P_IPV6, but sock's
sk_family is AF_INET, in that case, if sk-&gt;sk_bound_dev_if is zero, a wrong
sock will be returned.
the fix is to "continue" the searching, if no matching, return NULL.

Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Alexey Kuznetsov &lt;kuznet@ms2.inr.ac.ru&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Cc: Hideaki YOSHIFUJI &lt;yoshfuji@linux-ipv6.org&gt;
Cc: Patrick McHardy &lt;kaber@trash.net&gt;
Cc: netdev@vger.kernel.org
Signed-off-by: Jane Zhou &lt;a17711@motorola.com&gt;
Signed-off-by: Yiwei Zhao &lt;gbjc64@motorola.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>
</feed>
