<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/net/mac80211/mesh.c, branch v4.10</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: Fix adding of mesh vendor IEs</title>
<updated>2017-02-06T06:55:44+00:00</updated>
<author>
<name>Thorsten Horstmann</name>
<email>thorsten@defutech.de</email>
</author>
<published>2017-02-03T13:38:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=da7061c82e4a1bc6a5e134ef362c86261906c860'/>
<id>da7061c82e4a1bc6a5e134ef362c86261906c860</id>
<content type='text'>
The function ieee80211_ie_split_vendor doesn't return 0 on errors. Instead
it returns any offset &lt; ielen when WLAN_EID_VENDOR_SPECIFIC is found. The
return value in mesh_add_vendor_ies must therefore be checked against
ifmsh-&gt;ie_len and not 0. Otherwise all ifmsh-&gt;ie starting with
WLAN_EID_VENDOR_SPECIFIC will be rejected.

Fixes: 082ebb0c258d ("mac80211: fix mesh beacon format")
Signed-off-by: Thorsten Horstmann &lt;thorsten@defutech.de&gt;
Signed-off-by: Mathias Kretschmer &lt;mathias.kretschmer@fit.fraunhofer.de&gt;
Signed-off-by: Simon Wunderlich &lt;sw@simonwunderlich.de&gt;
[sven@narfation.org: Add commit message]
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function ieee80211_ie_split_vendor doesn't return 0 on errors. Instead
it returns any offset &lt; ielen when WLAN_EID_VENDOR_SPECIFIC is found. The
return value in mesh_add_vendor_ies must therefore be checked against
ifmsh-&gt;ie_len and not 0. Otherwise all ifmsh-&gt;ie starting with
WLAN_EID_VENDOR_SPECIFIC will be rejected.

Fixes: 082ebb0c258d ("mac80211: fix mesh beacon format")
Signed-off-by: Thorsten Horstmann &lt;thorsten@defutech.de&gt;
Signed-off-by: Mathias Kretschmer &lt;mathias.kretschmer@fit.fraunhofer.de&gt;
Signed-off-by: Simon Wunderlich &lt;sw@simonwunderlich.de&gt;
[sven@narfation.org: Add commit message]
Signed-off-by: Sven Eckelmann &lt;sven@narfation.org&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: mesh: flush stations before beacons are stopped</title>
<updated>2016-08-03T06:45:15+00:00</updated>
<author>
<name>Maital Hahn</name>
<email>maitalm@ti.com</email>
</author>
<published>2016-07-13T11:44:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c37a54ac37e7fbf8abe2b7b886ac5f1b3e8f8d29'/>
<id>c37a54ac37e7fbf8abe2b7b886ac5f1b3e8f8d29</id>
<content type='text'>
Some drivers (e.g. wl18xx) expect that the last stage in the
de-initialization process will be stopping the beacons, similar to AP flow.
Update ieee80211_stop_mesh() flow accordingly.
As peers can be removed dynamically, this would not impact other drivers.

Tested also on Ralink RT3572 chipset.

Signed-off-by: Maital Hahn &lt;maitalm@ti.com&gt;
Signed-off-by: Yaniv Machani &lt;yanivma@ti.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some drivers (e.g. wl18xx) expect that the last stage in the
de-initialization process will be stopping the beacons, similar to AP flow.
Update ieee80211_stop_mesh() flow accordingly.
As peers can be removed dynamically, this would not impact other drivers.

Tested also on Ralink RT3572 chipset.

Signed-off-by: Maital Hahn &lt;maitalm@ti.com&gt;
Signed-off-by: Yaniv Machani &lt;yanivma@ti.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: use common cleanup for user/!user_mpm</title>
<updated>2016-06-30T10:06:41+00:00</updated>
<author>
<name>Bob Copeland</name>
<email>me@bobcopeland.com</email>
</author>
<published>2016-06-25T23:14:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=efc401f49adf9c53a95f0430496c7a5433612e74'/>
<id>efc401f49adf9c53a95f0430496c7a5433612e74</id>
<content type='text'>
We've accumulated a couple of different fixes now to mesh_sta_cleanup()
due to the different paths that user_mpm and !user_mpm cases take -- one
fix to flush nexthop paths and one to fix the counting.

The only caller of mesh_plink_deactivate() is mesh_sta_cleanup(), so we
can push the user_mpm checks down into there in order to share more
code.

In doing so, we can remove an extra call to mesh_path_flush_by_nexthop()
and the (unnecessary) call to mesh_accept_plinks_update().  This will
also ensure the powersaving state code gets called in the user_mpm case.

The only cleanup tasks we need to avoid when MPM is in user-space
are sending the peering frames and stopping the plink timer, so wrap
those in the appropriate check.

Signed-off-by: Bob Copeland &lt;me@bobcopeland.com&gt;
Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We've accumulated a couple of different fixes now to mesh_sta_cleanup()
due to the different paths that user_mpm and !user_mpm cases take -- one
fix to flush nexthop paths and one to fix the counting.

The only caller of mesh_plink_deactivate() is mesh_sta_cleanup(), so we
can push the user_mpm checks down into there in order to share more
code.

In doing so, we can remove an extra call to mesh_path_flush_by_nexthop()
and the (unnecessary) call to mesh_accept_plinks_update().  This will
also ensure the powersaving state code gets called in the user_mpm case.

The only cleanup tasks we need to avoid when MPM is in user-space
are sending the peering frames and stopping the plink timer, so wrap
those in the appropriate check.

Signed-off-by: Bob Copeland &lt;me@bobcopeland.com&gt;
Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: Fix mesh estab_plinks counting in STA removal case</title>
<updated>2016-06-28T10:39:50+00:00</updated>
<author>
<name>Jouni Malinen</name>
<email>j@w1.fi</email>
</author>
<published>2016-06-19T20:51:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=126e7557328a1cd576be4fca95b133a2695283ff'/>
<id>126e7557328a1cd576be4fca95b133a2695283ff</id>
<content type='text'>
If a user space program (e.g., wpa_supplicant) deletes a STA entry that
is currently in NL80211_PLINK_ESTAB state, the number of established
plinks counter was not decremented and this could result in rejecting
new plink establishment before really hitting the real maximum plink
limit. For !user_mpm case, this decrementation is handled by
mesh_plink_deactive().

Fix this by decrementing estab_plinks on STA deletion
(mesh_sta_cleanup() gets called from there) so that the counter has a
correct value and the Beacon frame advertisement in Mesh Configuration
element shows the proper value for capability to accept additional
peers.

Cc: stable@vger.kernel.org
Signed-off-by: Jouni Malinen &lt;j@w1.fi&gt;
Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a user space program (e.g., wpa_supplicant) deletes a STA entry that
is currently in NL80211_PLINK_ESTAB state, the number of established
plinks counter was not decremented and this could result in rejecting
new plink establishment before really hitting the real maximum plink
limit. For !user_mpm case, this decrementation is handled by
mesh_plink_deactive().

Fix this by decrementing estab_plinks on STA deletion
(mesh_sta_cleanup() gets called from there) so that the counter has a
correct value and the Beacon frame advertisement in Mesh Configuration
element shows the proper value for capability to accept additional
peers.

Cc: stable@vger.kernel.org
Signed-off-by: Jouni Malinen &lt;j@w1.fi&gt;
Signed-off-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: mesh: flush mesh paths unconditionally</title>
<updated>2016-05-31T10:12:53+00:00</updated>
<author>
<name>Bob Copeland</name>
<email>me@bobcopeland.com</email>
</author>
<published>2016-05-15T17:19:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fe7a7c57629e8dcbc0e297363a9b2366d67a6dc5'/>
<id>fe7a7c57629e8dcbc0e297363a9b2366d67a6dc5</id>
<content type='text'>
Currently, the mesh paths associated with a nexthop station are cleaned
up in the following code path:

    __sta_info_destroy_part1
    synchronize_net()
    __sta_info_destroy_part2
     -&gt; cleanup_single_sta
       -&gt; mesh_sta_cleanup
         -&gt; mesh_plink_deactivate
           -&gt; mesh_path_flush_by_nexthop

However, there are a couple of problems here:

1) the paths aren't flushed at all if the MPM is running in userspace
   (e.g. when using wpa_supplicant or authsae)

2) there is no synchronize_rcu between removing the path and readers
   accessing the nexthop, which means the following race is possible:

CPU0                            CPU1
~~~~                            ~~~~
                                sta_info_destroy_part1()
                                synchronize_net()
rcu_read_lock()
mesh_nexthop_resolve()
  mpath = mesh_path_lookup()
                                [...] -&gt; mesh_path_flush_by_nexthop()
  sta = rcu_dereference(
    mpath-&gt;next_hop)
                                kfree(sta)
  access sta &lt;-- CRASH

Fix both of these by unconditionally flushing paths before destroying
the sta, and by adding a synchronize_net() after path flush to ensure
no active readers can still dereference the sta.

Fixes this crash:

[  348.529295] BUG: unable to handle kernel paging request at 00020040
[  348.530014] IP: [&lt;f929245d&gt;] ieee80211_mps_set_frame_flags+0x40/0xaa [mac80211]
[  348.530014] *pde = 00000000
[  348.530014] Oops: 0000 [#1] PREEMPT
[  348.530014] Modules linked in: drbg ansi_cprng ctr ccm ppp_generic slhc ipt_MASQUERADE nf_nat_masquerade_ipv4 8021q ]
[  348.530014] CPU: 0 PID: 20597 Comm: wget Tainted: G           O 4.6.0-rc5-wt=V1 #1
[  348.530014] Hardware name: To Be Filled By O.E.M./To be filled by O.E.M., BIOS 080016  11/07/2014
[  348.530014] task: f64fa280 ti: f4f9c000 task.ti: f4f9c000
[  348.530014] EIP: 0060:[&lt;f929245d&gt;] EFLAGS: 00010246 CPU: 0
[  348.530014] EIP is at ieee80211_mps_set_frame_flags+0x40/0xaa [mac80211]
[  348.530014] EAX: f4ce63e0 EBX: 00000088 ECX: f3788416 EDX: 00020008
[  348.530014] ESI: 00000000 EDI: 00000088 EBP: f6409a4c ESP: f6409a40
[  348.530014]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
[  348.530014] CR0: 80050033 CR2: 00020040 CR3: 33190000 CR4: 00000690
[  348.530014] Stack:
[  348.530014]  00000000 f4ce63e0 f5f9bd80 f6409a64 f9291d80 0000ce67 f5d51e00 f4ce63e0
[  348.530014]  f3788416 f6409a80 f9291dc1 f4ce8320 f4ce63e0 f5d51e00 f4ce63e0 f4ce8320
[  348.530014]  f6409a98 f9277f6f 00000000 00000000 0000007c 00000000 f6409b2c f9278dd1
[  348.530014] Call Trace:
[  348.530014]  [&lt;f9291d80&gt;] mesh_nexthop_lookup+0xbb/0xc8 [mac80211]
[  348.530014]  [&lt;f9291dc1&gt;] mesh_nexthop_resolve+0x34/0xd8 [mac80211]
[  348.530014]  [&lt;f9277f6f&gt;] ieee80211_xmit+0x92/0xc1 [mac80211]
[  348.530014]  [&lt;f9278dd1&gt;] __ieee80211_subif_start_xmit+0x807/0x83c [mac80211]
[  348.530014]  [&lt;c04df012&gt;] ? sch_direct_xmit+0xd7/0x1b3
[  348.530014]  [&lt;c022a8c6&gt;] ? __local_bh_enable_ip+0x5d/0x7b
[  348.530014]  [&lt;f956870c&gt;] ? nf_nat_ipv4_out+0x4c/0xd0 [nf_nat_ipv4]
[  348.530014]  [&lt;f957e036&gt;] ? iptable_nat_ipv4_fn+0xf/0xf [iptable_nat]
[  348.530014]  [&lt;c04c6f45&gt;] ? netif_skb_features+0x14d/0x30a
[  348.530014]  [&lt;f9278e10&gt;] ieee80211_subif_start_xmit+0xa/0xe [mac80211]
[  348.530014]  [&lt;c04c769c&gt;] dev_hard_start_xmit+0x1f8/0x267
[  348.530014]  [&lt;c04c7261&gt;] ?  validate_xmit_skb.isra.120.part.121+0x10/0x253
[  348.530014]  [&lt;c04defc6&gt;] sch_direct_xmit+0x8b/0x1b3
[  348.530014]  [&lt;c04c7a9c&gt;] __dev_queue_xmit+0x2c8/0x513
[  348.530014]  [&lt;c04c7cfb&gt;] dev_queue_xmit+0xa/0xc
[  348.530014]  [&lt;f91bfc7a&gt;] batadv_send_skb_packet+0xd6/0xec [batman_adv]
[  348.530014]  [&lt;f91bfdc4&gt;] batadv_send_unicast_skb+0x15/0x4a [batman_adv]
[  348.530014]  [&lt;f91b5938&gt;] batadv_dat_send_data+0x27e/0x310 [batman_adv]
[  348.530014]  [&lt;f91c30b5&gt;] ? batadv_tt_global_hash_find.isra.11+0x8/0xa [batman_adv]
[  348.530014]  [&lt;f91b63f3&gt;] batadv_dat_snoop_outgoing_arp_request+0x208/0x23d [batman_adv]
[  348.530014]  [&lt;f91c0cd9&gt;] batadv_interface_tx+0x206/0x385 [batman_adv]
[  348.530014]  [&lt;c04c769c&gt;] dev_hard_start_xmit+0x1f8/0x267
[  348.530014]  [&lt;c04c7261&gt;] ?  validate_xmit_skb.isra.120.part.121+0x10/0x253
[  348.530014]  [&lt;c04defc6&gt;] sch_direct_xmit+0x8b/0x1b3
[  348.530014]  [&lt;c04c7a9c&gt;] __dev_queue_xmit+0x2c8/0x513
[  348.530014]  [&lt;f80cbd2a&gt;] ? igb_xmit_frame+0x57/0x72 [igb]
[  348.530014]  [&lt;c04c7cfb&gt;] dev_queue_xmit+0xa/0xc
[  348.530014]  [&lt;f843a326&gt;] br_dev_queue_push_xmit+0xeb/0xfb [bridge]
[  348.530014]  [&lt;f843a35f&gt;] br_forward_finish+0x29/0x74 [bridge]
[  348.530014]  [&lt;f843a23b&gt;] ? deliver_clone+0x3b/0x3b [bridge]
[  348.530014]  [&lt;f843a714&gt;] __br_forward+0x89/0xe7 [bridge]
[  348.530014]  [&lt;f843a336&gt;] ? br_dev_queue_push_xmit+0xfb/0xfb [bridge]
[  348.530014]  [&lt;f843a234&gt;] deliver_clone+0x34/0x3b [bridge]
[  348.530014]  [&lt;f843a68b&gt;] ? br_flood+0x95/0x95 [bridge]
[  348.530014]  [&lt;f843a66d&gt;] br_flood+0x77/0x95 [bridge]
[  348.530014]  [&lt;f843a809&gt;] br_flood_forward+0x13/0x1a [bridge]
[  348.530014]  [&lt;f843a68b&gt;] ? br_flood+0x95/0x95 [bridge]
[  348.530014]  [&lt;f843b877&gt;] br_handle_frame_finish+0x392/0x3db [bridge]
[  348.530014]  [&lt;c04e9b2b&gt;] ? nf_iterate+0x2b/0x6b
[  348.530014]  [&lt;f843baa6&gt;] br_handle_frame+0x1e6/0x240 [bridge]
[  348.530014]  [&lt;f843b4e5&gt;] ? br_handle_local_finish+0x6a/0x6a [bridge]
[  348.530014]  [&lt;c04c4ba0&gt;] __netif_receive_skb_core+0x43a/0x66b
[  348.530014]  [&lt;f843b8c0&gt;] ? br_handle_frame_finish+0x3db/0x3db [bridge]
[  348.530014]  [&lt;c023cea4&gt;] ? resched_curr+0x19/0x37
[  348.530014]  [&lt;c0240707&gt;] ? check_preempt_wakeup+0xbf/0xfe
[  348.530014]  [&lt;c0255dec&gt;] ? ktime_get_with_offset+0x5c/0xfc
[  348.530014]  [&lt;c04c4fc1&gt;] __netif_receive_skb+0x47/0x55
[  348.530014]  [&lt;c04c57ba&gt;] netif_receive_skb_internal+0x40/0x5a
[  348.530014]  [&lt;c04c61ef&gt;] napi_gro_receive+0x3a/0x94
[  348.530014]  [&lt;f80ce8d5&gt;] igb_poll+0x6fd/0x9ad [igb]
[  348.530014]  [&lt;c0242bd8&gt;] ? swake_up_locked+0x14/0x26
[  348.530014]  [&lt;c04c5d29&gt;] net_rx_action+0xde/0x250
[  348.530014]  [&lt;c022a743&gt;] __do_softirq+0x8a/0x163
[  348.530014]  [&lt;c022a6b9&gt;] ? __hrtimer_tasklet_trampoline+0x19/0x19
[  348.530014]  [&lt;c021100f&gt;] do_softirq_own_stack+0x26/0x2c
[  348.530014]  &lt;IRQ&gt;
[  348.530014]  [&lt;c022a957&gt;] irq_exit+0x31/0x6f
[  348.530014]  [&lt;c0210eb2&gt;] do_IRQ+0x8d/0xa0
[  348.530014]  [&lt;c058152c&gt;] common_interrupt+0x2c/0x40
[  348.530014] Code: e7 8c 00 66 81 ff 88 00 75 12 85 d2 75 0e b2 c3 b8 83 e9 29 f9 e8 a7 5f f9 c6 eb 74 66 81 e3 8c 005
[  348.530014] EIP: [&lt;f929245d&gt;] ieee80211_mps_set_frame_flags+0x40/0xaa [mac80211] SS:ESP 0068:f6409a40
[  348.530014] CR2: 0000000000020040
[  348.530014] ---[ end trace 48556ac26779732e ]---
[  348.530014] Kernel panic - not syncing: Fatal exception in interrupt
[  348.530014] Kernel Offset: disabled

Cc: stable@vger.kernel.org
Reported-by: Fred Veldini &lt;fred.veldini@gmail.com&gt;
Tested-by: Fred Veldini &lt;fred.veldini@gmail.com&gt;
Signed-off-by: Bob Copeland &lt;me@bobcopeland.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, the mesh paths associated with a nexthop station are cleaned
up in the following code path:

    __sta_info_destroy_part1
    synchronize_net()
    __sta_info_destroy_part2
     -&gt; cleanup_single_sta
       -&gt; mesh_sta_cleanup
         -&gt; mesh_plink_deactivate
           -&gt; mesh_path_flush_by_nexthop

However, there are a couple of problems here:

1) the paths aren't flushed at all if the MPM is running in userspace
   (e.g. when using wpa_supplicant or authsae)

2) there is no synchronize_rcu between removing the path and readers
   accessing the nexthop, which means the following race is possible:

CPU0                            CPU1
~~~~                            ~~~~
                                sta_info_destroy_part1()
                                synchronize_net()
rcu_read_lock()
mesh_nexthop_resolve()
  mpath = mesh_path_lookup()
                                [...] -&gt; mesh_path_flush_by_nexthop()
  sta = rcu_dereference(
    mpath-&gt;next_hop)
                                kfree(sta)
  access sta &lt;-- CRASH

Fix both of these by unconditionally flushing paths before destroying
the sta, and by adding a synchronize_net() after path flush to ensure
no active readers can still dereference the sta.

Fixes this crash:

[  348.529295] BUG: unable to handle kernel paging request at 00020040
[  348.530014] IP: [&lt;f929245d&gt;] ieee80211_mps_set_frame_flags+0x40/0xaa [mac80211]
[  348.530014] *pde = 00000000
[  348.530014] Oops: 0000 [#1] PREEMPT
[  348.530014] Modules linked in: drbg ansi_cprng ctr ccm ppp_generic slhc ipt_MASQUERADE nf_nat_masquerade_ipv4 8021q ]
[  348.530014] CPU: 0 PID: 20597 Comm: wget Tainted: G           O 4.6.0-rc5-wt=V1 #1
[  348.530014] Hardware name: To Be Filled By O.E.M./To be filled by O.E.M., BIOS 080016  11/07/2014
[  348.530014] task: f64fa280 ti: f4f9c000 task.ti: f4f9c000
[  348.530014] EIP: 0060:[&lt;f929245d&gt;] EFLAGS: 00010246 CPU: 0
[  348.530014] EIP is at ieee80211_mps_set_frame_flags+0x40/0xaa [mac80211]
[  348.530014] EAX: f4ce63e0 EBX: 00000088 ECX: f3788416 EDX: 00020008
[  348.530014] ESI: 00000000 EDI: 00000088 EBP: f6409a4c ESP: f6409a40
[  348.530014]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
[  348.530014] CR0: 80050033 CR2: 00020040 CR3: 33190000 CR4: 00000690
[  348.530014] Stack:
[  348.530014]  00000000 f4ce63e0 f5f9bd80 f6409a64 f9291d80 0000ce67 f5d51e00 f4ce63e0
[  348.530014]  f3788416 f6409a80 f9291dc1 f4ce8320 f4ce63e0 f5d51e00 f4ce63e0 f4ce8320
[  348.530014]  f6409a98 f9277f6f 00000000 00000000 0000007c 00000000 f6409b2c f9278dd1
[  348.530014] Call Trace:
[  348.530014]  [&lt;f9291d80&gt;] mesh_nexthop_lookup+0xbb/0xc8 [mac80211]
[  348.530014]  [&lt;f9291dc1&gt;] mesh_nexthop_resolve+0x34/0xd8 [mac80211]
[  348.530014]  [&lt;f9277f6f&gt;] ieee80211_xmit+0x92/0xc1 [mac80211]
[  348.530014]  [&lt;f9278dd1&gt;] __ieee80211_subif_start_xmit+0x807/0x83c [mac80211]
[  348.530014]  [&lt;c04df012&gt;] ? sch_direct_xmit+0xd7/0x1b3
[  348.530014]  [&lt;c022a8c6&gt;] ? __local_bh_enable_ip+0x5d/0x7b
[  348.530014]  [&lt;f956870c&gt;] ? nf_nat_ipv4_out+0x4c/0xd0 [nf_nat_ipv4]
[  348.530014]  [&lt;f957e036&gt;] ? iptable_nat_ipv4_fn+0xf/0xf [iptable_nat]
[  348.530014]  [&lt;c04c6f45&gt;] ? netif_skb_features+0x14d/0x30a
[  348.530014]  [&lt;f9278e10&gt;] ieee80211_subif_start_xmit+0xa/0xe [mac80211]
[  348.530014]  [&lt;c04c769c&gt;] dev_hard_start_xmit+0x1f8/0x267
[  348.530014]  [&lt;c04c7261&gt;] ?  validate_xmit_skb.isra.120.part.121+0x10/0x253
[  348.530014]  [&lt;c04defc6&gt;] sch_direct_xmit+0x8b/0x1b3
[  348.530014]  [&lt;c04c7a9c&gt;] __dev_queue_xmit+0x2c8/0x513
[  348.530014]  [&lt;c04c7cfb&gt;] dev_queue_xmit+0xa/0xc
[  348.530014]  [&lt;f91bfc7a&gt;] batadv_send_skb_packet+0xd6/0xec [batman_adv]
[  348.530014]  [&lt;f91bfdc4&gt;] batadv_send_unicast_skb+0x15/0x4a [batman_adv]
[  348.530014]  [&lt;f91b5938&gt;] batadv_dat_send_data+0x27e/0x310 [batman_adv]
[  348.530014]  [&lt;f91c30b5&gt;] ? batadv_tt_global_hash_find.isra.11+0x8/0xa [batman_adv]
[  348.530014]  [&lt;f91b63f3&gt;] batadv_dat_snoop_outgoing_arp_request+0x208/0x23d [batman_adv]
[  348.530014]  [&lt;f91c0cd9&gt;] batadv_interface_tx+0x206/0x385 [batman_adv]
[  348.530014]  [&lt;c04c769c&gt;] dev_hard_start_xmit+0x1f8/0x267
[  348.530014]  [&lt;c04c7261&gt;] ?  validate_xmit_skb.isra.120.part.121+0x10/0x253
[  348.530014]  [&lt;c04defc6&gt;] sch_direct_xmit+0x8b/0x1b3
[  348.530014]  [&lt;c04c7a9c&gt;] __dev_queue_xmit+0x2c8/0x513
[  348.530014]  [&lt;f80cbd2a&gt;] ? igb_xmit_frame+0x57/0x72 [igb]
[  348.530014]  [&lt;c04c7cfb&gt;] dev_queue_xmit+0xa/0xc
[  348.530014]  [&lt;f843a326&gt;] br_dev_queue_push_xmit+0xeb/0xfb [bridge]
[  348.530014]  [&lt;f843a35f&gt;] br_forward_finish+0x29/0x74 [bridge]
[  348.530014]  [&lt;f843a23b&gt;] ? deliver_clone+0x3b/0x3b [bridge]
[  348.530014]  [&lt;f843a714&gt;] __br_forward+0x89/0xe7 [bridge]
[  348.530014]  [&lt;f843a336&gt;] ? br_dev_queue_push_xmit+0xfb/0xfb [bridge]
[  348.530014]  [&lt;f843a234&gt;] deliver_clone+0x34/0x3b [bridge]
[  348.530014]  [&lt;f843a68b&gt;] ? br_flood+0x95/0x95 [bridge]
[  348.530014]  [&lt;f843a66d&gt;] br_flood+0x77/0x95 [bridge]
[  348.530014]  [&lt;f843a809&gt;] br_flood_forward+0x13/0x1a [bridge]
[  348.530014]  [&lt;f843a68b&gt;] ? br_flood+0x95/0x95 [bridge]
[  348.530014]  [&lt;f843b877&gt;] br_handle_frame_finish+0x392/0x3db [bridge]
[  348.530014]  [&lt;c04e9b2b&gt;] ? nf_iterate+0x2b/0x6b
[  348.530014]  [&lt;f843baa6&gt;] br_handle_frame+0x1e6/0x240 [bridge]
[  348.530014]  [&lt;f843b4e5&gt;] ? br_handle_local_finish+0x6a/0x6a [bridge]
[  348.530014]  [&lt;c04c4ba0&gt;] __netif_receive_skb_core+0x43a/0x66b
[  348.530014]  [&lt;f843b8c0&gt;] ? br_handle_frame_finish+0x3db/0x3db [bridge]
[  348.530014]  [&lt;c023cea4&gt;] ? resched_curr+0x19/0x37
[  348.530014]  [&lt;c0240707&gt;] ? check_preempt_wakeup+0xbf/0xfe
[  348.530014]  [&lt;c0255dec&gt;] ? ktime_get_with_offset+0x5c/0xfc
[  348.530014]  [&lt;c04c4fc1&gt;] __netif_receive_skb+0x47/0x55
[  348.530014]  [&lt;c04c57ba&gt;] netif_receive_skb_internal+0x40/0x5a
[  348.530014]  [&lt;c04c61ef&gt;] napi_gro_receive+0x3a/0x94
[  348.530014]  [&lt;f80ce8d5&gt;] igb_poll+0x6fd/0x9ad [igb]
[  348.530014]  [&lt;c0242bd8&gt;] ? swake_up_locked+0x14/0x26
[  348.530014]  [&lt;c04c5d29&gt;] net_rx_action+0xde/0x250
[  348.530014]  [&lt;c022a743&gt;] __do_softirq+0x8a/0x163
[  348.530014]  [&lt;c022a6b9&gt;] ? __hrtimer_tasklet_trampoline+0x19/0x19
[  348.530014]  [&lt;c021100f&gt;] do_softirq_own_stack+0x26/0x2c
[  348.530014]  &lt;IRQ&gt;
[  348.530014]  [&lt;c022a957&gt;] irq_exit+0x31/0x6f
[  348.530014]  [&lt;c0210eb2&gt;] do_IRQ+0x8d/0xa0
[  348.530014]  [&lt;c058152c&gt;] common_interrupt+0x2c/0x40
[  348.530014] Code: e7 8c 00 66 81 ff 88 00 75 12 85 d2 75 0e b2 c3 b8 83 e9 29 f9 e8 a7 5f f9 c6 eb 74 66 81 e3 8c 005
[  348.530014] EIP: [&lt;f929245d&gt;] ieee80211_mps_set_frame_flags+0x40/0xaa [mac80211] SS:ESP 0068:f6409a40
[  348.530014] CR2: 0000000000020040
[  348.530014] ---[ end trace 48556ac26779732e ]---
[  348.530014] Kernel panic - not syncing: Fatal exception in interrupt
[  348.530014] Kernel Offset: disabled

Cc: stable@vger.kernel.org
Reported-by: Fred Veldini &lt;fred.veldini@gmail.com&gt;
Tested-by: Fred Veldini &lt;fred.veldini@gmail.com&gt;
Signed-off-by: Bob Copeland &lt;me@bobcopeland.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cfg80211: remove enum ieee80211_band</title>
<updated>2016-04-12T13:56:15+00:00</updated>
<author>
<name>Johannes Berg</name>
<email>johannes.berg@intel.com</email>
</author>
<published>2016-04-12T13:56:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=57fbcce37be7c1d2622b56587c10ade00e96afa3'/>
<id>57fbcce37be7c1d2622b56587c10ade00e96afa3</id>
<content type='text'>
This enum is already perfectly aliased to enum nl80211_band, and
the only reason for it is that we get IEEE80211_NUM_BANDS out of
it. There's no really good reason to not declare the number of
bands in nl80211 though, so do that and remove the cfg80211 one.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This enum is already perfectly aliased to enum nl80211_band, and
the only reason for it is that we get IEEE80211_NUM_BANDS out of
it. There's no really good reason to not declare the number of
bands in nl80211 though, so do that and remove the cfg80211 one.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: mesh: fix cleanup for mesh pathtable</title>
<updated>2016-04-05T19:34:53+00:00</updated>
<author>
<name>Bob Copeland</name>
<email>me@bobcopeland.com</email>
</author>
<published>2016-03-26T15:27:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0371a08fbb3e557f19db41e47a199ad8300c9c97'/>
<id>0371a08fbb3e557f19db41e47a199ad8300c9c97</id>
<content type='text'>
The mesh path table needs to be around for the entire time the
interface is in mesh mode, as users can perform an mpath dump
at any time.  The existing path table lifetime is instead tied
to the mesh BSS which can cause crashes when different MBSSes
are joined in the context of a single interface, or when the
path table is dumped when no MBSS is joined.

Introduce a new function to perform the final teardown of the
interface and perform path table cleanup there.  We already
free the individual path elements when the leaving the mesh
so no additional cleanup is needed there.  This fixes the
following crash:

[   47.753026] BUG: unable to handle kernel paging request at fffffff0
[   47.753026] IP: [&lt;c0239765&gt;] kthread_data+0xa/0xe
[   47.753026] *pde = 00741067 *pte = 00000000
[   47.753026] Oops: 0000 [#4] PREEMPT
[   47.753026] Modules linked in: ppp_generic slhc 8021q garp mrp sch_fq_codel iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat ip_tables ath9k_htc ath5k 8139too ath10k_pci ath10k_core arc4 ath9k ath9k_common ath9k_hw mac80211 ath cfg80211 cpufreq_powersave br_netfilter bridge stp llc ipw usb_wwan sierra_net usbnet af_alg natsemi via_rhine mii iTCO_wdt iTCO_vendor_support gpio_ich sierra coretemp pcspkr i2c_i801 lpc_ich ata_generic ata_piix libata ide_pci_generic piix e1000e igb i2c_algo_bit ptp pps_core [last unloaded: 8139too]
[   47.753026] CPU: 0 PID: 12 Comm: kworker/u2:1 Tainted: G      D W       4.5.0-wt-V3 #6
[   47.753026] Hardware name: To Be Filled By O.E.M./To be filled by O.E.M., BIOS 080016  11/07/2014
[   47.753026] task: f645a0c0 ti: f6462000 task.ti: f6462000
[   47.753026] EIP: 0060:[&lt;c0239765&gt;] EFLAGS: 00010002 CPU: 0
[   47.753026] EIP is at kthread_data+0xa/0xe
[   47.753026] EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000000
[   47.753026] ESI: f645a0c0 EDI: f645a2fc EBP: f6463a80 ESP: f6463a78
[   47.753026]  DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
[   47.753026] CR0: 8005003b CR2: 00000014 CR3: 353e5000 CR4: 00000690
[   47.753026] Stack:
[   47.753026]  c0236866 00000000 f6463aac c05768b4 00000009 f6463ba8 f6463ab0 c0247010
[   47.753026]  00000000 f645a0c0 f6464000 00000009 f6463ba8 f6463ab8 c0576eb2 f645a0c0
[   47.753026]  f6463aec c0228be4 c06335a4 f6463adc f6463ad0 c06c06d4 f6463ae4 c02471b0
[   47.753026] Call Trace:
[   47.753026]  [&lt;c0236866&gt;] ? wq_worker_sleeping+0xb/0x78
[   47.753026]  [&lt;c05768b4&gt;] __schedule+0xda/0x587
[   47.753026]  [&lt;c0247010&gt;] ? vprintk_default+0x12/0x14
[   47.753026]  [&lt;c0576eb2&gt;] schedule+0x72/0x89
[   47.753026]  [&lt;c0228be4&gt;] do_exit+0xb8/0x71d
[   47.753026]  [&lt;c02471b0&gt;] ? kmsg_dump+0xa9/0xae
[   47.753026]  [&lt;c0203576&gt;] oops_end+0x69/0x70
[   47.753026]  [&lt;c021dcdb&gt;] no_context+0x1bb/0x1c5
[   47.753026]  [&lt;c021de1b&gt;] __bad_area_nosemaphore+0x136/0x140
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c021de32&gt;] bad_area_nosemaphore+0xd/0x10
[   47.753026]  [&lt;c021e0a1&gt;] __do_page_fault+0x26c/0x320
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c021e2fa&gt;] do_page_fault+0xb/0xd
[   47.753026]  [&lt;c05798f8&gt;] error_code+0x58/0x60
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c0239765&gt;] ? kthread_data+0xa/0xe
[   47.753026]  [&lt;c0236866&gt;] ? wq_worker_sleeping+0xb/0x78
[   47.753026]  [&lt;c05768b4&gt;] __schedule+0xda/0x587
[   47.753026]  [&lt;c0247010&gt;] ? vprintk_default+0x12/0x14
[   47.753026]  [&lt;c0576eb2&gt;] schedule+0x72/0x89
[   47.753026]  [&lt;c0228be4&gt;] do_exit+0xb8/0x71d
[   47.753026]  [&lt;c02471b0&gt;] ? kmsg_dump+0xa9/0xae
[   47.753026]  [&lt;c0203576&gt;] oops_end+0x69/0x70
[   47.753026]  [&lt;c021dcdb&gt;] no_context+0x1bb/0x1c5
[   47.753026]  [&lt;c021de1b&gt;] __bad_area_nosemaphore+0x136/0x140
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c021de32&gt;] bad_area_nosemaphore+0xd/0x10
[   47.753026]  [&lt;c021e0a1&gt;] __do_page_fault+0x26c/0x320
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c021e2fa&gt;] do_page_fault+0xb/0xd
[   47.753026]  [&lt;c05798f8&gt;] error_code+0x58/0x60
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c0239765&gt;] ? kthread_data+0xa/0xe
[   47.753026]  [&lt;c0236866&gt;] ? wq_worker_sleeping+0xb/0x78
[   47.753026]  [&lt;c05768b4&gt;] __schedule+0xda/0x587
[   47.753026]  [&lt;c0391e32&gt;] ? put_io_context_active+0x6d/0x95
[   47.753026]  [&lt;c0576eb2&gt;] schedule+0x72/0x89
[   47.753026]  [&lt;c02291f8&gt;] do_exit+0x6cc/0x71d
[   47.753026]  [&lt;c0203576&gt;] oops_end+0x69/0x70
[   47.753026]  [&lt;c021dcdb&gt;] no_context+0x1bb/0x1c5
[   47.753026]  [&lt;c021de1b&gt;] __bad_area_nosemaphore+0x136/0x140
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c021de32&gt;] bad_area_nosemaphore+0xd/0x10
[   47.753026]  [&lt;c021e0a1&gt;] __do_page_fault+0x26c/0x320
[   47.753026]  [&lt;c03b9160&gt;] ? debug_smp_processor_id+0x12/0x16
[   47.753026]  [&lt;c02015e2&gt;] ? __switch_to+0x24/0x40e
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c021e2fa&gt;] do_page_fault+0xb/0xd
[   47.753026]  [&lt;c05798f8&gt;] error_code+0x58/0x60
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c03b59d2&gt;] ? rhashtable_walk_init+0x5c/0x93
[   47.753026]  [&lt;f9843221&gt;] mesh_path_tbl_expire.isra.24+0x19/0x82 [mac80211]
[   47.753026]  [&lt;f984408b&gt;] mesh_path_expire+0x11/0x1f [mac80211]
[   47.753026]  [&lt;f9842bb7&gt;] ieee80211_mesh_work+0x73/0x1a9 [mac80211]
[   47.753026]  [&lt;f98207d1&gt;] ieee80211_iface_work+0x2ff/0x311 [mac80211]
[   47.753026]  [&lt;c0235fa3&gt;] process_one_work+0x14b/0x24e
[   47.753026]  [&lt;c0236313&gt;] worker_thread+0x249/0x343
[   47.753026]  [&lt;c02360ca&gt;] ? process_scheduled_works+0x24/0x24
[   47.753026]  [&lt;c0239359&gt;] kthread+0x9e/0xa3
[   47.753026]  [&lt;c0578e50&gt;] ret_from_kernel_thread+0x20/0x40
[   47.753026]  [&lt;c02392bb&gt;] ? kthread_parkme+0x18/0x18
[   47.753026] Code: 6b c0 85 c0 75 05 e8 fb 74 fc ff 89 f8 84 c0 75 08 8d 45 e8 e8 34 dd 33 00 83 c4 28 5b 5e 5f 5d c3 55 8b 80 10 02 00 00 89 e5 5d &lt;8b&gt; 40 f0 c3 55 b9 04 00 00 00 89 e5 52 8b 90 10 02 00 00 8d 45
[   47.753026] EIP: [&lt;c0239765&gt;] kthread_data+0xa/0xe SS:ESP 0068:f6463a78
[   47.753026] CR2: 00000000fffffff0
[   47.753026] ---[ end trace 867ca0bdd0767790 ]---

Fixes: 3b302ada7f0a ("mac80211: mesh: move path tables into if_mesh")
Reported-by: Fred Veldini &lt;fred.veldini@gmail.com&gt;
Signed-off-by: Bob Copeland &lt;me@bobcopeland.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The mesh path table needs to be around for the entire time the
interface is in mesh mode, as users can perform an mpath dump
at any time.  The existing path table lifetime is instead tied
to the mesh BSS which can cause crashes when different MBSSes
are joined in the context of a single interface, or when the
path table is dumped when no MBSS is joined.

Introduce a new function to perform the final teardown of the
interface and perform path table cleanup there.  We already
free the individual path elements when the leaving the mesh
so no additional cleanup is needed there.  This fixes the
following crash:

[   47.753026] BUG: unable to handle kernel paging request at fffffff0
[   47.753026] IP: [&lt;c0239765&gt;] kthread_data+0xa/0xe
[   47.753026] *pde = 00741067 *pte = 00000000
[   47.753026] Oops: 0000 [#4] PREEMPT
[   47.753026] Modules linked in: ppp_generic slhc 8021q garp mrp sch_fq_codel iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat ip_tables ath9k_htc ath5k 8139too ath10k_pci ath10k_core arc4 ath9k ath9k_common ath9k_hw mac80211 ath cfg80211 cpufreq_powersave br_netfilter bridge stp llc ipw usb_wwan sierra_net usbnet af_alg natsemi via_rhine mii iTCO_wdt iTCO_vendor_support gpio_ich sierra coretemp pcspkr i2c_i801 lpc_ich ata_generic ata_piix libata ide_pci_generic piix e1000e igb i2c_algo_bit ptp pps_core [last unloaded: 8139too]
[   47.753026] CPU: 0 PID: 12 Comm: kworker/u2:1 Tainted: G      D W       4.5.0-wt-V3 #6
[   47.753026] Hardware name: To Be Filled By O.E.M./To be filled by O.E.M., BIOS 080016  11/07/2014
[   47.753026] task: f645a0c0 ti: f6462000 task.ti: f6462000
[   47.753026] EIP: 0060:[&lt;c0239765&gt;] EFLAGS: 00010002 CPU: 0
[   47.753026] EIP is at kthread_data+0xa/0xe
[   47.753026] EAX: 00000000 EBX: 00000000 ECX: 00000000 EDX: 00000000
[   47.753026] ESI: f645a0c0 EDI: f645a2fc EBP: f6463a80 ESP: f6463a78
[   47.753026]  DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
[   47.753026] CR0: 8005003b CR2: 00000014 CR3: 353e5000 CR4: 00000690
[   47.753026] Stack:
[   47.753026]  c0236866 00000000 f6463aac c05768b4 00000009 f6463ba8 f6463ab0 c0247010
[   47.753026]  00000000 f645a0c0 f6464000 00000009 f6463ba8 f6463ab8 c0576eb2 f645a0c0
[   47.753026]  f6463aec c0228be4 c06335a4 f6463adc f6463ad0 c06c06d4 f6463ae4 c02471b0
[   47.753026] Call Trace:
[   47.753026]  [&lt;c0236866&gt;] ? wq_worker_sleeping+0xb/0x78
[   47.753026]  [&lt;c05768b4&gt;] __schedule+0xda/0x587
[   47.753026]  [&lt;c0247010&gt;] ? vprintk_default+0x12/0x14
[   47.753026]  [&lt;c0576eb2&gt;] schedule+0x72/0x89
[   47.753026]  [&lt;c0228be4&gt;] do_exit+0xb8/0x71d
[   47.753026]  [&lt;c02471b0&gt;] ? kmsg_dump+0xa9/0xae
[   47.753026]  [&lt;c0203576&gt;] oops_end+0x69/0x70
[   47.753026]  [&lt;c021dcdb&gt;] no_context+0x1bb/0x1c5
[   47.753026]  [&lt;c021de1b&gt;] __bad_area_nosemaphore+0x136/0x140
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c021de32&gt;] bad_area_nosemaphore+0xd/0x10
[   47.753026]  [&lt;c021e0a1&gt;] __do_page_fault+0x26c/0x320
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c021e2fa&gt;] do_page_fault+0xb/0xd
[   47.753026]  [&lt;c05798f8&gt;] error_code+0x58/0x60
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c0239765&gt;] ? kthread_data+0xa/0xe
[   47.753026]  [&lt;c0236866&gt;] ? wq_worker_sleeping+0xb/0x78
[   47.753026]  [&lt;c05768b4&gt;] __schedule+0xda/0x587
[   47.753026]  [&lt;c0247010&gt;] ? vprintk_default+0x12/0x14
[   47.753026]  [&lt;c0576eb2&gt;] schedule+0x72/0x89
[   47.753026]  [&lt;c0228be4&gt;] do_exit+0xb8/0x71d
[   47.753026]  [&lt;c02471b0&gt;] ? kmsg_dump+0xa9/0xae
[   47.753026]  [&lt;c0203576&gt;] oops_end+0x69/0x70
[   47.753026]  [&lt;c021dcdb&gt;] no_context+0x1bb/0x1c5
[   47.753026]  [&lt;c021de1b&gt;] __bad_area_nosemaphore+0x136/0x140
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c021de32&gt;] bad_area_nosemaphore+0xd/0x10
[   47.753026]  [&lt;c021e0a1&gt;] __do_page_fault+0x26c/0x320
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c021e2fa&gt;] do_page_fault+0xb/0xd
[   47.753026]  [&lt;c05798f8&gt;] error_code+0x58/0x60
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c0239765&gt;] ? kthread_data+0xa/0xe
[   47.753026]  [&lt;c0236866&gt;] ? wq_worker_sleeping+0xb/0x78
[   47.753026]  [&lt;c05768b4&gt;] __schedule+0xda/0x587
[   47.753026]  [&lt;c0391e32&gt;] ? put_io_context_active+0x6d/0x95
[   47.753026]  [&lt;c0576eb2&gt;] schedule+0x72/0x89
[   47.753026]  [&lt;c02291f8&gt;] do_exit+0x6cc/0x71d
[   47.753026]  [&lt;c0203576&gt;] oops_end+0x69/0x70
[   47.753026]  [&lt;c021dcdb&gt;] no_context+0x1bb/0x1c5
[   47.753026]  [&lt;c021de1b&gt;] __bad_area_nosemaphore+0x136/0x140
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c021de32&gt;] bad_area_nosemaphore+0xd/0x10
[   47.753026]  [&lt;c021e0a1&gt;] __do_page_fault+0x26c/0x320
[   47.753026]  [&lt;c03b9160&gt;] ? debug_smp_processor_id+0x12/0x16
[   47.753026]  [&lt;c02015e2&gt;] ? __switch_to+0x24/0x40e
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c021e2fa&gt;] do_page_fault+0xb/0xd
[   47.753026]  [&lt;c05798f8&gt;] error_code+0x58/0x60
[   47.753026]  [&lt;c021e2ef&gt;] ? vmalloc_sync_all+0x19a/0x19a
[   47.753026]  [&lt;c03b59d2&gt;] ? rhashtable_walk_init+0x5c/0x93
[   47.753026]  [&lt;f9843221&gt;] mesh_path_tbl_expire.isra.24+0x19/0x82 [mac80211]
[   47.753026]  [&lt;f984408b&gt;] mesh_path_expire+0x11/0x1f [mac80211]
[   47.753026]  [&lt;f9842bb7&gt;] ieee80211_mesh_work+0x73/0x1a9 [mac80211]
[   47.753026]  [&lt;f98207d1&gt;] ieee80211_iface_work+0x2ff/0x311 [mac80211]
[   47.753026]  [&lt;c0235fa3&gt;] process_one_work+0x14b/0x24e
[   47.753026]  [&lt;c0236313&gt;] worker_thread+0x249/0x343
[   47.753026]  [&lt;c02360ca&gt;] ? process_scheduled_works+0x24/0x24
[   47.753026]  [&lt;c0239359&gt;] kthread+0x9e/0xa3
[   47.753026]  [&lt;c0578e50&gt;] ret_from_kernel_thread+0x20/0x40
[   47.753026]  [&lt;c02392bb&gt;] ? kthread_parkme+0x18/0x18
[   47.753026] Code: 6b c0 85 c0 75 05 e8 fb 74 fc ff 89 f8 84 c0 75 08 8d 45 e8 e8 34 dd 33 00 83 c4 28 5b 5e 5f 5d c3 55 8b 80 10 02 00 00 89 e5 5d &lt;8b&gt; 40 f0 c3 55 b9 04 00 00 00 89 e5 52 8b 90 10 02 00 00 8d 45
[   47.753026] EIP: [&lt;c0239765&gt;] kthread_data+0xa/0xe SS:ESP 0068:f6463a78
[   47.753026] CR2: 00000000fffffff0
[   47.753026] ---[ end trace 867ca0bdd0767790 ]---

Fixes: 3b302ada7f0a ("mac80211: mesh: move path tables into if_mesh")
Reported-by: Fred Veldini &lt;fred.veldini@gmail.com&gt;
Signed-off-by: Bob Copeland &lt;me@bobcopeland.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: mesh: use hlist for rmc cache</title>
<updated>2016-04-05T19:34:51+00:00</updated>
<author>
<name>Bob Copeland</name>
<email>me@bobcopeland.com</email>
</author>
<published>2016-03-19T02:11:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=47a0489ce1e518f4936c7fedb93b3d2abd7ccd2e'/>
<id>47a0489ce1e518f4936c7fedb93b3d2abd7ccd2e</id>
<content type='text'>
The RMC cache has 256 list heads plus a u32, which puts it at the
unfortunate size of 4104 bytes with padding.  kmalloc() will then
round this up to the next power-of-two, so we wind up actually
using two pages here where most of the second is wasted.

Switch to hlist heads here to reduce the structure size down to
fit within a page.

Signed-off-by: Bob Copeland &lt;me@bobcopeland.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The RMC cache has 256 list heads plus a u32, which puts it at the
unfortunate size of 4104 bytes with padding.  kmalloc() will then
round this up to the next power-of-two, so we wind up actually
using two pages here where most of the second is wasted.

Switch to hlist heads here to reduce the structure size down to
fit within a page.

Signed-off-by: Bob Copeland &lt;me@bobcopeland.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: mesh: handle failed alloc for rmc cache</title>
<updated>2016-04-05T19:34:50+00:00</updated>
<author>
<name>Bob Copeland</name>
<email>me@bobcopeland.com</email>
</author>
<published>2016-03-19T02:11:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0aa7fabbd5d9da1f8a8fdc3e2837c532bcfa5664'/>
<id>0aa7fabbd5d9da1f8a8fdc3e2837c532bcfa5664</id>
<content type='text'>
In the unlikely case that mesh_rmc_init() fails with -ENOMEM,
the rmc pointer will be left as NULL but the interface is still
operational because ieee80211_mesh_init_sdata() is not allowed
to fail.

If this happens, we would blindly dereference rmc when checking
whether a multicast frame is in the cache.  Instead just drop the
frames in the forwarding path.

Signed-off-by: Bob Copeland &lt;me@bobcopeland.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the unlikely case that mesh_rmc_init() fails with -ENOMEM,
the rmc pointer will be left as NULL but the interface is still
operational because ieee80211_mesh_init_sdata() is not allowed
to fail.

If this happens, we would blindly dereference rmc when checking
whether a multicast frame is in the cache.  Instead just drop the
frames in the forwarding path.

Signed-off-by: Bob Copeland &lt;me@bobcopeland.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mac80211: mesh: convert path table to rhashtable</title>
<updated>2016-04-05T08:56:33+00:00</updated>
<author>
<name>Bob Copeland</name>
<email>me@bobcopeland.com</email>
</author>
<published>2016-03-02T15:09:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=60854fd94573f0d3b80b55b40cf0140a0430f3ab'/>
<id>60854fd94573f0d3b80b55b40cf0140a0430f3ab</id>
<content type='text'>
In the time since the mesh path table was implemented as an
RCU-traversable, dynamically growing hash table, a generic RCU
hashtable implementation was added to the kernel.

Switch the mesh path table over to rhashtable to remove some code
and also gain some features like automatic shrinking.

Cc: Thomas Graf &lt;tgraf@suug.ch&gt;
Cc: netdev@vger.kernel.org
Signed-off-by: Bob Copeland &lt;me@bobcopeland.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In the time since the mesh path table was implemented as an
RCU-traversable, dynamically growing hash table, a generic RCU
hashtable implementation was added to the kernel.

Switch the mesh path table over to rhashtable to remove some code
and also gain some features like automatic shrinking.

Cc: Thomas Graf &lt;tgraf@suug.ch&gt;
Cc: netdev@vger.kernel.org
Signed-off-by: Bob Copeland &lt;me@bobcopeland.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
