Bug 15408

Summary: WARNING: at net/mac80211/mlme.c:2090 ieee80211_sta_work
Product: Networking Reporter: Alex Zhavnerchik (alex.vizor)
Component: WirelessAssignee: Reinette Chatre (reinette.chatre)
Status: CLOSED CODE_FIX    
Severity: normal CC: linville, maciej.rutecki, reinette.chatre, rjw
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 2.6.33 Tree: Mainline
Regression: Yes
Bug Depends on:    
Bug Blocks: 14885    
Attachments: here is dmesg
here is my kernel config
Enable memory allocation to sleep

Description Alex Zhavnerchik 2010-02-27 08:45:57 UTC
Created attachment 25258 [details]
here is dmesg

This bug appears only on 2.6.33 release, on previous versions and 2.6.33 rcs I didn't catch it. It appears after resume from s2ram. After I do "rmmod iwlagn" and then "modprobe iwlagn" wireless starts working.

I use "03:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)" on my Thinkpad T61
Comment 1 Alex Zhavnerchik 2010-02-27 08:47:10 UTC
Created attachment 25259 [details]
here is my kernel config
Comment 2 John W. Linville 2010-02-27 15:00:45 UTC
So, are you saying that the device doesn't work after getting that warning on resume?
Comment 3 Alex Zhavnerchik 2010-02-27 18:44:45 UTC
Yes, exactly
Comment 4 Reinette Chatre 2010-03-02 17:41:48 UTC
Created attachment 25325 [details]
Enable memory allocation to sleep

Could you please test this patch?
Comment 5 Alex Zhavnerchik 2010-03-02 22:49:20 UTC
Yeh, I'll try
Comment 6 Alex Zhavnerchik 2010-03-02 22:51:56 UTC
But I can't guaranty that I can test it properly. I didn't reproduce it after initial report.
Comment 7 Reinette Chatre 2010-03-02 23:05:25 UTC
I am confident that the patch provided will address this issue. Please note that the issue being addressed is not the "WARNING: at net/mac80211/mlme.c:2090 ieee80211_sta_work" - the actual problem occurred earlier.

Taking a closer look at your logs you will see the problem starts with a memory allocation failure:

[70331.126159] s2ram: page allocation failure. order:4, mode:0x40d0
[70331.126163] Pid: 10885, comm: s2ram Tainted: G        W  2.6.33 #3
[70331.126165] Call Trace:
[70331.126175]  [<ffffffff810ba437>] __alloc_pages_nodemask+0x577/0x620
[70331.126180]  [<ffffffff810dfa2a>] alloc_pages_current+0x90/0x99
[70331.126183]  [<ffffffff810b8c6d>] __get_free_pages+0x9/0x46
[70331.126204]  [<ffffffffa03f1854>] iwl_tx_queue_init+0xf3/0x29b [iwlcore]
[...]

Even though this failure occurs during resume the device is not stopped and later requests to it will clearly fail. One failure is what you captured in the title of this bug report. Notice how that error you captured has the message ... "STA MLME work scheduled while going to suspend" included. This is because the system still considers it in suspended state due to the failure of resume.

Now, the the problem that triggered all of these failures (the memory allocation failure) has already been shown to be fixed by the patch provided. Please see http://lkml.org/lkml/2010/2/6/70 for a duplicate report.

We should thus send this patch to stable.
Comment 8 Rafael J. Wysocki 2010-03-21 19:50:42 UTC
Fixed by commit f36d04abe684f9e2b07c6ebe9f77ae20eb5c1e84 .