Re: [BUG] 3.10 regression: hang on suspend

From: Stanislaw Gruszka
Date: Fri Jul 19 2013 - 08:08:18 EST


On Fri, Jul 19, 2013 at 02:08:42PM +0200, Stanislaw Gruszka wrote:
> On Thu, Jul 18, 2013 at 08:57:59PM +0200, Ortwin Glück wrote:
> > On 07/18/2013 12:55 PM, Stanislaw Gruszka wrote:
> > >objdump -r -d --prefix-addresses net/mac80211/mac80211.ko > mac80211.txt
> > >objdump -r -d --prefix-addresses drivers/net/wireless/iwlwifi/dvm/iwldvm.ko > iwldvm.txt
> >
> > Here you go. Please note, that the offsets have changed due to
> > .config changes. New trace attached. Transcript:
> >
> > iwlagn_mac_remove_interface+0x5f/0x160
> > __ieee80211_suspend+0x4a1/0xb30
> > ieee80211_suspend+0x1a/0x20
>
> Crash happen because we call iwlagn_mac_remove_interface with
> vif_priv->ctx NULL. I do not see any possibility of that other than
> doing ->remove_interface without previous ->add_interface, but I do
> not see how that possible.
>
> Does crash happen on any suspend or on second one ?
>
> 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.

This time really attaching forgotten patch.

Stanislaw
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
index cab23af..7f25fe1 100644
--- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
@@ -1536,6 +1536,9 @@ static void iwlagn_mac_remove_interface(struct ieee80211_hw *hw,

IWL_DEBUG_MAC80211(priv, "enter\n");

+ if (WARN(ctx == NULL, "remove interface with NULL ctx\n"))
+ return;
+
mutex_lock(&priv->mutex);

if (WARN_ON(ctx->vif != vif)) {