Skip to contentSkip to conversation

BUG: scheduling while atomic 2.6.39-rc7 (iwl3945_irq_tasklet)

DISCUSSION James Hogan 3 participants 5 messages May 13, 2011 – Jun 1, 2011 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

Hi,

On 2.6.39-rc7 I've seen a panic due to "BUG: scheduling while atomic" with the backtrace below (not much detail as it was written in a text message while it was displayed on the screen!). All worked fine in 2.6.38.

This was soon after resuming from suspend (enough time to unlock the screen, but not much else). I think it was the same bug I saw in rc2 but didn't have time to track down. I can probably get it to happen again if more detail is needed. It doesn't happen every suspend (I think it had survived a couple of suspend/resume cycles at this point).

I could bisect if necessary, but hopefully the backtrace will be enough to see what's going on?

Cheers
James

...
die
do_general_protection
? restore_args
general protection
? iwl3945_irq_tasklet
? handle_irq_event
tasklet_action
__do_softirq
? lock_release
call_softirq
do_softirq
irq_exit
do_IRQ
common_interrupt

#1 lore raw
Quoted 7 lines · James Hogan

Hi,

On 2.6.39-rc7 I've seen a panic due to "BUG: scheduling while atomic" with the backtrace below (not much detail as it was written in a text message while it was displayed on the screen!). All worked fine in 2.6.38.

Quoted 8 lines

This was soon after resuming from suspend (enough time to unlock the screen, but not much else). I think it was the same bug I saw in rc2 but didn't have time to track down. I can probably get it to happen again if more detail is needed. It doesn't happen every suspend (I think it had survived a couple of suspend/resume cycles at this point).

I could bisect if necessary, but hopefully the backtrace will be enough to see what's going on?

A bisect might be very helpful -- time is short for 2.6.39 already.

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#2 lore raw
Quoted 14 lines · John W. Linville
Quoted 13 lines · James Hogan

Hi,

On 2.6.39-rc7 I've seen a panic due to "BUG: scheduling while atomic" with the backtrace below (not much detail as it was written in a text message while it was displayed on the screen!). All worked fine in 2.6.38.

This was soon after resuming from suspend (enough time to unlock the screen, but not much else). I think it was the same bug I saw in rc2 but didn't have time to track down. I can probably get it to happen again if more detail is needed. It doesn't happen every suspend (I think it had survived a couple of suspend/resume cycles at this point).

Quoted 4 lines
Quoted 2 lines

I could bisect if necessary, but hopefully the backtrace will be enough to see what's going on?

A bisect might be very helpful -- time is short for 2.6.39 already.

Hmm, it won't reproduce. I'll have to try and bisect this evening, as it was in my home network that it hit the BUG before.

Cheers
James

Quoted 6 lines

John
--
John W. Linville                Someday the world will need a hero, and you [email protected]                  might be all we have.  Be ready.

Signature · 1 line
James Hogan
#3 lore raw
Quoted 13 lines · James Hogan
Quoted 12 lines · John W. Linville
Quoted 11 lines · James Hogan

On 2.6.39-rc7 I've seen a panic due to "BUG: scheduling while atomic" with the backtrace below (not much detail as it was written in a text message while it was displayed on the screen!). All worked fine in 2.6.38.

This was soon after resuming from suspend (enough time to unlock the screen, but not much else). I think it was the same bug I saw in rc2 but didn't have time to track down. I can probably get it to happen again if more detail is needed. It doesn't happen every suspend (I think it had survived a couple of suspend/resume cycles at this point).

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

I could bisect if necessary, but hopefully the backtrace will be enough to see what's going on?

A bisect might be very helpful -- time is short for 2.6.39 already.

Hmm, it won't reproduce. I'll have to try and bisect this evening, as it was in my home network that it hit the BUG before.

We use mutex in atomic contex when changing channel. I'm not sure if this is the particular problem you have. If you found a way to reproduce, you may try this patch:

drivers/net/wireless/iwlegacy/iwl-core.c +0 -2
index 42df832..01244b2 100644
@@ -861,9 +861,7 @@ void iwl_legacy_chswitch_done(struct iwl_priv *priv, bool is_success)
 
 	if (priv->switch_rxon.switch_in_progress) {
 		ieee80211_chswitch_done(ctx->vif, is_success);
-		mutex_lock(&priv->mutex);
 		priv->switch_rxon.switch_in_progress = false;
-		mutex_unlock(&priv->mutex);
 	}
 }
 EXPORT_SYMBOL(iwl_legacy_chswitch_done);
#4 lore raw
Quoted 17 lines · Stanislaw Gruszka
Quoted 16 lines · James Hogan
Quoted 15 lines · John W. Linville
Quoted 13 lines · James Hogan

On 2.6.39-rc7 I've seen a panic due to "BUG: scheduling while atomic" with the backtrace below (not much detail as it was written in a text message while it was displayed on the screen!). All worked fine in 2.6.38.

This was soon after resuming from suspend (enough time to unlock the screen, but not much else). I think it was the same bug I saw in rc2 but didn't have time to track down. I can probably get it to happen again if more detail is needed. It doesn't happen every suspend (I think it had survived a couple of suspend/resume cycles at this point).

I could bisect if necessary, but hopefully the backtrace will be enough to see what's going on?

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

A bisect might be very helpful -- time is short for 2.6.39 already.

Hmm, it won't reproduce. I'll have to try and bisect this evening, as it was in my home network that it hit the BUG before.

We use mutex in atomic contex when changing channel. I'm not sure if this is the particular problem you have. If you found a way to reproduce, you may try this patch:

Thanks, I haven't managed to reproduce the problem at all unfortunately so cannot bisect it (although I have had several failed suspends, where it just boots up again from scratch instead of resuming).

I'll try the patch when i get a chance

Cheers
James

Quoted 16 lines
drivers/net/wireless/iwlegacy/iwl-core.c +0 -2
index 42df832..01244b2 100644
@@ -861,9 +861,7 @@ void iwl_legacy_chswitch_done(struct iwl_priv *priv, bool is_success)
 
        if (priv->switch_rxon.switch_in_progress) {
                ieee80211_chswitch_done(ctx->vif, is_success);
-               mutex_lock(&priv->mutex);
                priv->switch_rxon.switch_in_progress = false;
-               mutex_unlock(&priv->mutex);
        }
  }
  EXPORT_SYMBOL(iwl_legacy_chswitch_done);
Signature · 1 line
James Hogan