Bug 13344 - gelic get_wireless_stats implementation is not atomic
Summary: gelic get_wireless_stats implementation is not atomic
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: network-wireless (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_network-wireless@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-19 13:22 UTC by Stijn Tintel
Modified: 2010-03-05 18:44 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.30-rc6-02770-g7ef67c0
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Kernel config (33.47 KB, application/octet-stream)
2009-05-19 13:22 UTC, Stijn Tintel
Details
patch to not require stats handler to be atomic (1.72 KB, patch)
2009-05-19 15:10 UTC, Johannes Berg
Details | Diff
Full dmesg as requested. (10.40 KB, text/plain)
2009-05-29 10:56 UTC, Stijn Tintel
Details
Full dmesg with unpatched kernel (11.65 KB, text/plain)
2009-06-02 00:19 UTC, Stijn Tintel
Details

Description Stijn Tintel 2009-05-19 13:22:56 UTC
Created attachment 21427 [details]
Kernel config

Every time I boot (Gentoo) Linux on my PS3, the following error appears in dmesg:

BUG: scheduling while atomic: grep/6390/0x00000002
Modules linked in: rtc_ps3 rtc_core snd_ps3 snd_pcm ps3_gelic ps3rom snd_page_alloc ps3_lpm ps3flash rtc_lib snd_timer ps3vram nfs auth_rpcgss nfs_acl lockd sunrpc usbhid ohci_hcd usb_storage ehci_hcd sr_mod cdrom sg scsi_wait_scan
Call Trace:
[c000000006f7f470] [c00000000000f680] .show_stack+0x68/0x198 (unreliable)
[c000000006f7f520] [c000000000050a84] .__schedule_bug+0x9c/0xa8
[c000000006f7f5b0] [c0000000002f3230] .__schedule+0x440/0x8c8
[c000000006f7f6f0] [c0000000002f36dc] .schedule+0x24/0x50
[c000000006f7f770] [c0000000002f3b5c] .schedule_timeout+0x1a4/0x208
[c000000006f7f860] [c0000000002f2d04] .wait_for_common+0x174/0x1a0
[c000000006f7f930] [d0000000003cad70] .gelic_eurus_sync_cmd+0xa8/0xd8 [ps3_gelic]
[c000000006f7f9d0] [d0000000003cccc4] .gelic_wl_get_wireless_stats+0x6c/0xe8 [ps3_gelic]
[c000000006f7fa70] [c0000000002f0eec] .wireless_seq_show+0x64/0x158
[c000000006f7fb40] [c00000000010404c] .seq_read+0x394/0x528
[c000000006f7fc30] [c00000000013cda0] .proc_reg_read+0xb0/0x108
[c000000006f7fce0] [c0000000000e2034] .vfs_read+0xec/0x1a8
[c000000006f7fd80] [c0000000000e2208] .SyS_read+0x58/0xc8
[c000000006f7fe30] [c0000000000074b4] syscall_exit+0x0/0x40
gelic_eurus_sync_cmd_worker: cmd issue failed


This happens with current ps3-linux.git kernel (2.6.30-rc6-02770-g7ef67c0), but I am seeing this problem since at least 2.6.28.
The only kernel I tried that does not have this problem is 2.6.23-ps3 which comes with the Gentoo PS3 install CD.

I initially reported this bug on the Gentoo bugzilla at http://bugs.gentoo.org/show_bug.cgi?id=260253, but they suggested to report it here.
Comment 1 Johannes Berg 2009-05-19 14:56:57 UTC
Let's remove the atomic requirement instead -- that should be fairly simple.
Comment 2 Johannes Berg 2009-05-19 15:10:35 UTC
Created attachment 21429 [details]
patch to not require stats handler to be atomic

This will apply against wireless-testing only.
Comment 3 Stijn Tintel 2009-05-21 09:35:36 UTC
With wireless-testing + attached patch, I am no longer seeing the scheduling while atomic bug.

However, the following line still appears, but I don't know if it's related:
gelic_eurus_sync_cmd_worker: cmd issue failed
Comment 4 Geoff Levand 2009-05-28 19:25:57 UTC
Could you please add your kernel .config file and the full dmesg as attachments to this bug.

-Geoff
Comment 5 Stijn Tintel 2009-05-29 10:56:30 UTC
Created attachment 21623 [details]
Full dmesg as requested.
Comment 6 Stijn Tintel 2009-05-29 10:57:00 UTC
Dmesg attached, config was already there.
Comment 7 Geoff Levand 2009-06-01 23:08:48 UTC
I don't seem to see the scheduling while atomic error in that dmsg.  Maybe you attached the wrong one?

-Geoff
Comment 8 Stijn Tintel 2009-06-01 23:36:55 UTC
The attached dmesg is wireless-testing + the patch to not require stats handler to be atomic applied. I'll attach full dmesg of unpatched ps3-linux 2.6.30-rc6-wl-23980-g5a476b9.
Comment 9 Stijn Tintel 2009-06-02 00:19:32 UTC
Created attachment 21696 [details]
Full dmesg with unpatched kernel
Comment 10 Stijn Tintel 2009-06-02 00:38:37 UTC
Correction, the latest dmesg is not ps3-linux but also wireless-testing kernel.
Comment 11 John W. Linville 2010-03-05 18:43:35 UTC
The patch from comment 2 is incorporated here:

commit 3d23e349d807177eaf519d444677cee86b1a04cf
Author: Johannes Berg <johannes@sipsolutions.net>
Date:   Tue Sep 29 23:27:28 2009 +0200

    wext: refactor
    
    Refactor wext to
     * split out iwpriv handling
     * split out iwspy handling
     * split out procfs support
     * allow cfg80211 to have wireless extensions compat code
       w/o CONFIG_WIRELESS_EXT
    
    After this, drivers need to
     - select WIRELESS_EXT      - for wext support
     - select WEXT_PRIV - for iwpriv support
     - select WEXT_SPY  - for iwspy support
    
    except cfg80211 -- which gets new hooks in wext-core.c
    and can then get wext handlers without CONFIG_WIRELESS_EXT.
    
    Wireless extensions procfs support is auto-selected
    based on PROC_FS and anything that requires the wext core
    (i.e. WIRELESS_EXT or CFG80211_WEXT).
    
    Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>

Note You need to log in before you can comment on or make changes to this bug.