]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: close AP_VLAN interfaces before unregistering all
authorJohannes Berg <johannes.berg@intel.com>
Thu, 23 May 2013 23:06:09 +0000 (01:06 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 23 May 2013 23:06:09 +0000 (01:06 +0200)
commitf910f43fbf292016182dc997282e81e1a64e793b
tree44b63f3a3611d9b5231f1e5cd2fb0ff0d14a5c3d
parentef0523851df2e5cbd97f4d50dc448632af0c1391
mac80211: close AP_VLAN interfaces before unregistering all

Since Eric's commit 7f7906eb1 ("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.

Cc: stable@vger.kernel.org [2.6.33+]
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/iface.c