linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: "Ortwin Glück" <odi@odi.ch>
Cc: Arend van Spriel <arend@broadcom.com>,
	linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: [BUG] 3.10 regression: hang on suspend
Date: Mon, 22 Jul 2013 13:22:37 +0200	[thread overview]
Message-ID: <20130722112236.GA7364@redhat.com> (raw)
In-Reply-To: <51E9899E.3080307@odi.ch>

[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]

On Fri, Jul 19, 2013 at 08:46:54PM +0200, Ortwin Glück wrote:
> On 07/19/2013 02:08 PM, Stanislaw Gruszka wrote:
> >I'm attaching patch, which should prevent crash (but not fix the issue,
> >just workaround it), plese apply it. If it make suspend work, please then
> >reload iwlwifi module with debug=0x3 option, suspend/resume machine and
> >provide dmesg output after that.
> 
> 
> Here the requested dmesg. Please note that two different WARN_ONs
> trigger here directly after each other.
> 
> To me it looks like iwlagn_mac_remove_interface() is called twice,
> but I am not familiar with the code.

We remove interface that we do not add in the driver. I think I found
reason of that - I removed below code in bad commit:

        list_for_each_entry(sdata, &local->interfaces, list) {
[snip]
-               switch (sdata->vif.type) {
-               case NL80211_IFTYPE_AP_VLAN:
-               case NL80211_IFTYPE_MONITOR:
-                       /* skip these */
-                       continue;

Attached patch should correct that. Please test if it fixes the
crash.

Thanks
Stanislaw


[-- Attachment #2: mac80211_fix_suspend_crash.patch --]
[-- Type: text/plain, Size: 663 bytes --]

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);
 	}
 

  reply	other threads:[~2013-07-22 11:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-15 19:40 [BUG] 3.10 regression: hang on suspend Ortwin Glück
2013-07-16  6:56 ` Stanislaw Gruszka
2013-07-16  7:34   ` Ortwin Glück
2013-07-16  9:49     ` Arend van Spriel
2013-07-16 18:23       ` Ortwin Glück
2013-07-17 12:29         ` Stanislaw Gruszka
     [not found]           ` <51E6E1AB.5010300@odi.ch>
2013-07-18 10:55             ` Stanislaw Gruszka
     [not found]               ` <51E83AB7.6020002@odi.ch>
2013-07-19 12:08                 ` Stanislaw Gruszka
2013-07-19 12:11                   ` Stanislaw Gruszka
2013-07-19 12:15                   ` Ortwin Glück
2013-07-19 18:46                   ` Ortwin Glück
2013-07-22 11:22                     ` Stanislaw Gruszka [this message]
2013-07-22 19:05                       ` Ortwin Glück

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130722112236.GA7364@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=arend@broadcom.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=odi@odi.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).