Bug 15667
Summary: | general protection fault from iwlagn | ||
---|---|---|---|
Product: | Drivers | Reporter: | Peter Zijlstra (a.p.zijlstra) |
Component: | network-wireless | Assignee: | Johannes Berg (johannes) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | johannes, linville, reinette.chatre |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 2.6.34-rc3-tip+ | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
dmesg output
dmesg output with printk patch dmesg with printk output for real now patch to fix internal scan race |
Description
Peter Zijlstra
2010-04-01 14:09:30 UTC
Created attachment 25800 [details]
dmesg output
dmesg output
Please add http://paste.pocoo.org/raw/196316/ --- wireless-testing.orig/drivers/net/wireless/iwlwifi/iwl-scan.c 2010-04-01 16:04:48.000000000 +0200 +++ wireless-testing/drivers/net/wireless/iwlwifi/iwl-scan.c 2010-04-01 16:06:15.000000000 +0200 @@ -264,6 +264,7 @@ static void iwl_rx_scan_complete_notif(s reschedule: priv->scan_pass_start = jiffies; + printk(KERN_DEBUG "queueing request_scan in complete, bands=%x\n", priv->scan_bands); queue_work(priv->workqueue, &priv->request_scan); } @@ -475,6 +476,7 @@ static int iwl_scan_initiate(struct iwl_ priv->scan_start = jiffies; priv->scan_pass_start = priv->scan_start; + printk(KERN_DEBUG "queueing request_scan in initiate, bands=%x\n", priv->scan_bands); queue_work(priv->workqueue, &priv->request_scan); return 0; @@ -575,6 +577,7 @@ int iwl_internal_short_hw_scan(struct iw IWL_DEBUG_SCAN(priv, "Start internal short scan...\n"); set_bit(STATUS_SCANNING, &priv->status); priv->is_internal_short_scan = true; + printk(KERN_DEBUG "queueing request_scan in internal, bands=%x\n", priv->scan_bands); queue_work(priv->workqueue, &priv->request_scan); out: Created attachment 25820 [details]
dmesg output with printk patch
Another splat, with debug=0x802 and the printk patch applied. Please let me know if you need more information.
Either bugzilla or I am confused, or you attached the same file again? Created attachment 25836 [details]
dmesg with printk output for real now
Well, ok, clear now what's going on... is_internal_short_scan starts out as true ieee80211 phy0: U iwl_bg_scan_completed SCAN complete scan ieee80211 phy0: I iwl_internal_short_hw_scan Start internal short scan... queueing request_scan in internal, bands=1 still set to true ieee80211 phy0: U iwl_bg_scan_completed internal short scan completed this sets it to false, but the next scan is already in progress!! Now iwl_bg_request_scan will check the variable and find it false, even though it should be true. is_internal_short_scan needs to be protected by a lock, probably priv->mutex. No, it's not that simple ... all this is really racy. Created attachment 25881 [details]
patch to fix internal scan race
Let me know what happens.
Yep, that seems to have cured it, machine has been happy for days now, whereas it used to die several times a day before this. |