]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jun 2013 19:42:30 +0000 (12:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jun 2013 19:42:30 +0000 (12:42 -0700)
added patches:
mac80211-close-ap_vlan-interfaces-before-unregistering-all.patch

queue-3.4/mac80211-close-ap_vlan-interfaces-before-unregistering-all.patch [new file with mode: 0644]
queue-3.4/series

diff --git a/queue-3.4/mac80211-close-ap_vlan-interfaces-before-unregistering-all.patch b/queue-3.4/mac80211-close-ap_vlan-interfaces-before-unregistering-all.patch
new file mode 100644 (file)
index 0000000..661e2d1
--- /dev/null
@@ -0,0 +1,46 @@
+From c8aa22db0112f640ac6631347f850879c621840b Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg@intel.com>
+Date: Fri, 24 May 2013 01:06:09 +0200
+Subject: mac80211: close AP_VLAN interfaces before unregistering all
+
+From: Johannes Berg <johannes.berg@intel.com>
+
+commit c8aa22db0112f640ac6631347f850879c621840b upstream.
+
+Since Eric's commit efe117ab8 ("Speedup ieee80211_remove_interfaces")
+there's a bug in mac80211 when it unregisters with AP_VLAN interfaces
+up. If the AP_VLAN interface was registered after the AP it belongs
+to (which is the typical case) and then we get into this code path,
+unregister_netdevice_many() will crash because it isn't prepared to
+deal with interfaces being closed in the middle of it. Exactly this
+happens though, because we iterate the list, find the AP master this
+AP_VLAN belongs to and dev_close() the dependent VLANs. After this,
+unregister_netdevice_many() won't pick up the fact that the AP_VLAN
+is already down and will do it again, causing a crash.
+
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Cc: Eric Dumazet <eric.dumazet@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ net/mac80211/iface.c |    9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/net/mac80211/iface.c
++++ b/net/mac80211/iface.c
+@@ -1257,6 +1257,15 @@ void ieee80211_remove_interfaces(struct
+       ASSERT_RTNL();
++      /*
++       * Close all AP_VLAN interfaces first, as otherwise they
++       * might be closed while the AP interface they belong to
++       * is closed, causing unregister_netdevice_many() to crash.
++       */
++      list_for_each_entry(sdata, &local->interfaces, list)
++              if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
++                      dev_close(sdata->dev);
++
+       mutex_lock(&local->iflist_mtx);
+       list_for_each_entry_safe(sdata, tmp, &local->interfaces, list) {
+               list_del(&sdata->list);
index a28c4024c4d8ef8cc17b7c11b5df65fa2b610e91..eda69117ff8256f61ad725ec539a7e78822a29a5 100644 (file)
@@ -40,3 +40,4 @@ xen-netback-remove-skb-in-xen_netbk_alloc_page.patch
 iommu-amd-re-enable-iommu-event-log-interrupt-after-handling.patch
 iommu-amd-workaround-for-erbt1312.patch
 x86-um-correct-syscall-table-type-attributes-breaking-gcc-4.8.patch
+mac80211-close-ap_vlan-interfaces-before-unregistering-all.patch