Kernel BUG: scheduling while atomic

Dan Williams dcbw at redhat.com
Wed Feb 18 22:57:33 EST 2009


On Wed, 2009-02-18 at 15:25 -0500, Kareem Shehata wrote:
> Hey Dan,
> 
> As Dave Kroetsch mentioned, we've gotten some very strange results at  
> Aeryon using a Unex 8385 CF module on an arm processor.  Specifically,  
> setting the kernel tick to 1000 Hz (CONFIG_HZ = 1000) produces a  
> "scheduling while atomic" bug when setting the ssid for the second  
> time after boot, the messages for which are below.  Also, enabling  
> debug messages for libertas (LIBERTAS_DEBUG=y) seems to make any  
> filetransfer very slow, around 15 kB/s, whether or not any debug  
> message flags are enabled.  Are these known issues, and if not how do  
> we go about solving them?

So the scheduling while atomic thing with get_wireless_stats() is known;
apparently it's never been correct to block there.  The fix is somewhat
involved, requiring the driver to cache values returned from get_stats()
instead of actually hitting up the hardware with CMD_802_11_LOG.
Blocking on the LOG command completing is the source of the scheduling
bug.

Dan

> Thanks,
> 
> Kareem
> 
> 
> [  120.625000] BUG: scheduling while atomic: iwconfig/0x00000001/1728
> [  120.631000] [<c0028d54>] (dump_stack+0x0/0x14) from [<c02907e4>]  
> (schedule+0x64/0x678)
> [  120.640000] [<c0290780>] (schedule+0x0/0x678) from [<bf01ec4c>]  
> (__lbs_cmd+0x118/0x21c [libertas])
> [  120.649000] [<bf01eb34>] (__lbs_cmd+0x0/0x21c [libertas]) from  
> [<bf019df4>] (lbs_get_wireless_stats+0x1a8/0x354 [libertas])
> [  120.660000] [<bf019c4c>] (lbs_get_wireless_stats+0x0/0x354  
> [libertas]) from [<c0289448>] (get_wireless_stats+0x2c/0x38)
> [  120.671000]  r8:00000002 r7:00000400 r6:4001e000 r5:c2f3f2e0  
> r4:c2530000
> [  120.678000] [<c028941c>] (get_wireless_stats+0x0/0x38) from  
> [<c028a310>] (wireless_seq_show+0x38/0x108)
> [  120.688000] [<c028a2d8>] (wireless_seq_show+0x0/0x108) from  
> [<c00ac074>] (seq_read+0x230/0x388)
> [  120.697000] [<c00abe44>] (seq_read+0x0/0x388) from [<c008ef94>]  
> (vfs_read+0xb4/0x144)
> [  120.705000] [<c008eee0>] (vfs_read+0x0/0x144) from [<c008f3d4>]  
> (sys_read+0x44/0x70)
> [  120.713000]  r7:00000000 r6:00000000 r5:fffffff7 r4:c2aed720
> [  120.718000] [<c008f390>] (sys_read+0x0/0x70) from [<c0024ea0>]  
> (ret_fast_syscall+0x0/0x2c)
> [  120.727000]  r7:00000003 r6:000003ff r5:00000000 r4:00015008
> 
> The attached text file has the debug messages before and after the  
> BUG.  Search for "scheduling while atomic", it's near the middle.
> 
> 
> --
> Kareem Shehata
> Aeryon Labs Inc.
> 519-489-6726 x254
> http://aeryon.com
> 
> 
> 
> 
> _______________________________________________
> libertas-dev mailing list
> libertas-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libertas-dev




More information about the libertas-dev mailing list