Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: fix monitor interface suspend crash regression

My commit:

commit 12e7f517029dad819c45eca9ca01fdb9ba57616b
Author: Stanislaw Gruszka <sgruszka@redhat.com>
Date: Thu Feb 28 10:55:26 2013 +0100

mac80211: cleanup generic suspend/resume procedures

removed check for deleting MONITOR and AP_VLAN when suspend. That can
cause a crash (i.e. in iwlagn_mac_remove_interface()) since we remove
interface in the driver that we did not add before.

Reference:
http://marc.info/?l=linux-kernel&m=137391815113860&w=2

Bisected-by: Ortwin Glück <odi@odi.ch>
Reported-and-tested-by: Ortwin Glück <odi@odi.ch>
Cc: stable@vger.kernel.org # 3.10
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Stanislaw Gruszka and committed by
Johannes Berg
cd34f647 40d18ff9

+5 -2
+5 -2
net/mac80211/pm.c
··· 99 99 } 100 100 mutex_unlock(&local->sta_mtx); 101 101 102 - /* remove all interfaces */ 102 + /* remove all interfaces that were created in the driver */ 103 103 list_for_each_entry(sdata, &local->interfaces, list) { 104 - if (!ieee80211_sdata_running(sdata)) 104 + if (!ieee80211_sdata_running(sdata) || 105 + sdata->vif.type == NL80211_IFTYPE_AP_VLAN || 106 + sdata->vif.type == NL80211_IFTYPE_MONITOR) 105 107 continue; 108 + 106 109 drv_remove_interface(local, sdata); 107 110 } 108 111