All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix monitor interface suspend crash regression
@ 2013-07-23 11:56 Stanislaw Gruszka
  2013-07-23 12:02 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Stanislaw Gruszka @ 2013-07-23 11:56 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Ortwin Glück

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>
---
 net/mac80211/pm.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index 7fc5d0d..3401262 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -99,10 +99,13 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
 	}
 	mutex_unlock(&local->sta_mtx);
 
-	/* remove all interfaces */
+	/* remove all interfaces that were created in the driver */
 	list_for_each_entry(sdata, &local->interfaces, list) {
-		if (!ieee80211_sdata_running(sdata))
+		if (!ieee80211_sdata_running(sdata) ||
+		    sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
+		    sdata->vif.type == NL80211_IFTYPE_MONITOR)
 			continue;
+
 		drv_remove_interface(local, sdata);
 	}
 
-- 
1.7.11.7


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mac80211: fix monitor interface suspend crash regression
  2013-07-23 11:56 [PATCH] mac80211: fix monitor interface suspend crash regression Stanislaw Gruszka
@ 2013-07-23 12:02 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2013-07-23 12:02 UTC (permalink / raw)
  To: Stanislaw Gruszka; +Cc: linux-wireless, Ortwin Glück

On Tue, 2013-07-23 at 13:56 +0200, Stanislaw Gruszka wrote:
> 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.

Applied, thanks.

johannes


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-23 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-23 11:56 [PATCH] mac80211: fix monitor interface suspend crash regression Stanislaw Gruszka
2013-07-23 12:02 ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.