Kernel oops with g_file_storage and ifconfig

Mike Montour mail at mmontour.net
Sat Mar 14 03:08:46 CET 2009


Kernel: recent andy-tracking (1e257a0e99817a338e3706708ebb5036518e46d8), 
built with OE's "linux-openmoko-devel" recipe. Rootfs is approximately 
FSO-unstable, built locally with some modifications.

I was testing the g_file_storage module with the intent of eventually 
exporting the FreeRunner's uSD card as a USB Storage device (although 
for these tests I was just using a local file). To do this I ssh'd in 
over WiFi, unloaded the g_ether module, then loaded the g_file_storage 
module. After I had done this I typed 'ifconfig eth0' and encountered a 
segfault and an 'oops' message (see below). I have been able to 
reproduce this a few times.

----

root at om-gta02:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:12:CF:8E:E2:9B
           inet addr:192.168.1.202  Bcast:192.168.1.255  Mask:255.255.255.0
           inet6 addr: fe80::212:cfff:fe8e:e29b/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:240 errors:0 dropped:0 overruns:0 frame:0
           TX packets:179 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:46586 (45.4 KiB)  TX bytes:19502 (19.0 KiB)

root at om-gta02:~# ifconfig usb0 down
root at om-gta02:~# rmmod g_ether
root at om-gta02:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:12:CF:8E:E2:9B
           inet addr:192.168.1.202  Bcast:192.168.1.255  Mask:255.255.255.0
           inet6 addr: fe80::212:cfff:fe8e:e29b/64 Scope:Link
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:368 errors:0 dropped:0 overruns:0 frame:0
           TX packets:259 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:1000
           RX bytes:70834 (69.1 KiB)  TX bytes:29196 (28.5 KiB)

root at om-gta02:~# dmesg
[  104.295000] gta02_udc_command S3C2410_UDC_P_DISABLE
root at om-gta02:~# modprobe g_file_storage stall=0 file="/TMPIMG"
root at om-gta02:~# ifconfig eth0
Segmentation fault
root at om-gta02:~# dmesg
[  104.295000] gta02_udc_command S3C2410_UDC_P_DISABLE
[  152.490000] g_file_storage gadget: File-backed Storage Gadget, 
version: 20 November 2008
[  152.490000] g_file_storage gadget: Number of LUNs=1
[  152.490000] g_file_storage gadget-lun0: ro=0, file: /TMPIMG
[  152.490000] gta02_udc_command S3C2410_UDC_P_ENABLE
[  153.225000] g_file_storage gadget: full speed config #1
[  158.745000] Unable to handle kernel paging request at virtual address 
dead4eac
[  158.750000] pgd = c6cbc000
[  158.750000] [dead4eac] *pgd=00000000
[  158.750000] Internal error: Oops: 0 [#1] PREEMPT
[  158.750000] Modules linked in: g_file_storage rfcomm ipv6 hidp l2cap 
bluetooth ar6000 s3cmci ohci_hcd s3c2410_wdt snd_soc_wm8753 snd_soc_core 
snd_pcm snd_timer snd_page_alloc snd [last unloaded: g_ether]
[  158.750000] CPU: 0    Not tainted  (2.6.29-rc3 #1)
[  158.750000] PC is at 0xdead4eac
[  158.750000] LR is at dev_get_stats+0x28/0x34
[  158.750000] pc : [<dead4eac>]    lr : [<c0249eec>]    psr: a0000013
[  158.750000] sp : c6d37e68  ip : c6d37e78  fp : c6d37e74
[  158.750000] r10: 00000000  r9 : c6da0c80  r8 : 00000400
[  158.750000] r7 : 4001e000  r6 : c7b04800  r5 : c7ba9ca0  r4 : c7b04800
[  158.750000] r3 : c7b04850  r2 : dead4ead  r1 : c0384138  r0 : c7b04800
[  158.750000] Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM 
Segment user
[  158.750000] Control: c000717f  Table: 36cbc000  DAC: 00000015
[  158.750000] Process ifconfig (pid: 1564, stack limit = 0xc6d36268)
[  158.750000] Stack: (0xc6d37e68 to 0xc6d38000)
[  158.750000] 7e60:                   c6d37ecc c6d37e78 c024a420 
c0249ed4 00000000 00000000
[  158.750000] 7e80: 00000000 00000000 00000000 00000000 00000000 
00000000 00000000 00000000
[  158.750000] 7ea0: 00000000 00000000 00000000 00000000 00000000 
c00b6918 00000000 c7ba9ca0
[  158.750000] 7ec0: c6d37f1c c6d37ed0 c00b6bc4 c024a3fc c6d37f04 
00000143 c6d37f78 c7ba9cc0
[  158.750000] 7ee0: 00000002 00000000 00000001 00000000 c6da0c80 
c00b6918 c789dc80 fffffffb
[  158.750000] 7f00: c6da0c80 c6d37f78 4001e000 00000400 c6d37f4c 
c6d37f20 c00d7dc4 c00b6928
[  158.750000] 7f20: c017fa84 c6da0c80 4001e000 c6d37f78 00000400 
c0029fc4 c6d36000 401ee000
[  158.750000] 7f40: c6d37f74 c6d37f50 c009e054 c00d7d44 c005c590 
c017f948 c6da0c80 00000000
[  158.750000] 7f60: 00000000 00000003 c6d37fa4 c6d37f78 c009e45c 
c009dfac 00000000 00000000
[  158.750000] 7f80: 00000000 00000000 000000c0 000ad008 000ad008 
000001ff 00000000 c6d37fa8
[  158.750000] 7fa0: c0029e40 c009e420 000ad008 000ad008 00000003 
4001e000 00000400 00000000
[  158.750000] 7fc0: 000ad008 000ad008 000001ff 00000003 bee167a0 
0000000a 401ee000 bee167a0
[  158.750000] 7fe0: 00000003 bee166b0 401344b8 40181acc 60000010 
00000003 00000000 00000000
[  158.750000] Backtrace:
[  158.750000] [<c0249ec4>] (dev_get_stats+0x0/0x34) from [<c024a420>] 
(dev_seq_show+0x34/0x110)
[  158.750000] [<c024a3ec>] (dev_seq_show+0x0/0x110) from [<c00b6bc4>] 
(seq_read+0x2ac/0x41c)
[  158.750000]  r5:c7ba9ca0 r4:00000000
[  158.750000] [<c00b6918>] (seq_read+0x0/0x41c) from [<c00d7dc4>] 
(proc_reg_read+0x90/0xa4)
[  158.750000] [<c00d7d34>] (proc_reg_read+0x0/0xa4) from [<c009e054>] 
(vfs_read+0xb8/0x148)
[  158.750000] [<c009df9c>] (vfs_read+0x0/0x148) from [<c009e45c>] 
(sys_read+0x4c/0x7c)
[  158.750000]  r7:00000003 r6:00000000 r5:00000000 r4:c6da0c80
[  158.750000] [<c009e410>] (sys_read+0x0/0x7c) from [<c0029e40>] 
(ret_fast_syscall+0x0/0x2c)
[  158.750000]  r6:000001ff r5:000ad008 r4:000ad008
[  158.750000] Code: bad PC value.
[  158.750000] ---[ end trace dda2680a3b0c7b36 ]---
[  158.750000] note: ifconfig[1564] exited with preempt_count 1
[  158.750000] BUG: scheduling while atomic: ifconfig/1564/0x40000002
[  158.750000] INFO: lockdep is turned off.
[  158.750000] Modules linked in: g_file_storage rfcomm ipv6 hidp l2cap 
bluetooth ar6000 s3cmci ohci_hcd s3c2410_wdt snd_soc_wm8753 snd_soc_core 
snd_pcm snd_timer snd_page_alloc snd [last unloaded: g_ether]
[  158.750000] [<c002dcac>] (dump_stack+0x0/0x14) from [<c003e7c4>] 
(__schedule_bug+0x58/0x64)
[  158.750000] [<c003e76c>] (__schedule_bug+0x0/0x64) from [<c02c4fe4>] 
(schedule+0x74/0x408)
[  158.750000]  r5:00000000 r4:c6d36000
[  158.750000] [<c02c4f70>] (schedule+0x0/0x408) from [<c003e800>] 
(__cond_resched+0x30/0x50)
[  158.750000] [<c003e7d0>] (__cond_resched+0x0/0x50) from [<c02c55e4>] 
(_cond_resched+0x48/0x54)
[  158.750000]  r4:00000001
[  158.750000] [<c02c559c>] (_cond_resched+0x0/0x54) from [<c008af44>] 
(unmap_vmas+0x55c/0x644)
[  158.750000]  r4:c6c11b00
[  158.750000] [<c008a9e8>] (unmap_vmas+0x0/0x644) from [<c008dbcc>] 
(exit_mmap+0xd8/0x1c8)
[  158.750000] [<c008daf4>] (exit_mmap+0x0/0x1c8) from [<c00410c0>] 
(mmput+0x58/0xf8)
[  158.750000]  r7:c6c11b34 r6:c6c11b9c r5:00000000 r4:c6c11b00
[  158.750000] [<c0041068>] (mmput+0x0/0xf8) from [<c0045018>] 
(exit_mm+0x12c/0x13c)
[  158.750000]  r6:c6e40380 r5:c6c11b00 r4:c6e40748
[  158.750000] [<c0044eec>] (exit_mm+0x0/0x13c) from [<c0046520>] 
(do_exit+0x148/0x6b0)
[  158.750000]  r7:00000000 r6:0000000b r5:c6e40380 r4:c6d36000
[  158.750000] [<c00463d8>] (do_exit+0x0/0x6b0) from [<c002db18>] 
(die+0x274/0x300)
[  158.750000] [<c002d8a4>] (die+0x0/0x300) from [<c002f508>] 
(__do_kernel_fault+0x6c/0x7c)
[  158.755000] [<c002f49c>] (__do_kernel_fault+0x0/0x7c) from 
[<c002f7c4>] (do_bad_area+0x70/0x7c)
[  158.755000]  r7:4001e000 r6:dead4eac r5:00000000 r4:c6d37e20
[  158.755000] [<c002f754>] (do_bad_area+0x0/0x7c) from [<c002f85c>] 
(do_translation_fault+0x74/0x80)
[  158.755000]  r6:c7b04800 r5:000037a8 r4:00000000
[  158.755000] [<c002f7e8>] (do_translation_fault+0x0/0x80) from 
[<c00291c0>] (do_PrefetchAbort+0x18/0x1c)
[  158.755000]  r5:c6d37e54 r4:ffffffff
[  158.755000] [<c00291a8>] (do_PrefetchAbort+0x0/0x1c) from 
[<c0029b20>] (__pabt_svc+0x40/0x80)
[  158.755000] Exception stack(0xc6d37e20 to 0xc6d37e68)
[  158.755000] 7e20: c7b04800 c0384138 dead4ead c7b04850 c7b04800 
c7ba9ca0 c7b04800 4001e000
[  158.755000] 7e40: 00000400 c6da0c80 00000000 c6d37e74 c6d37e78 
c6d37e68 c0249eec dead4eac
[  158.755000] 7e60: a0000013 ffffffff 

[  158.755000] [<c0249ec4>] (dev_get_stats+0x0/0x34) from [<c024a420>] 
(dev_seq_show+0x34/0x110)
[  158.755000] [<c024a3ec>] (dev_seq_show+0x0/0x110) from [<c00b6bc4>] 
(seq_read+0x2ac/0x41c)
[  158.755000]  r5:c7ba9ca0 r4:00000000
[  158.755000] [<c00b6918>] (seq_read+0x0/0x41c) from [<c00d7dc4>] 
(proc_reg_read+0x90/0xa4)
[  158.755000] [<c00d7d34>] (proc_reg_read+0x0/0xa4) from [<c009e054>] 
(vfs_read+0xb8/0x148)
[  158.755000] [<c009df9c>] (vfs_read+0x0/0x148) from [<c009e45c>] 
(sys_read+0x4c/0x7c)
[  158.755000]  r7:00000003 r6:00000000 r5:00000000 r4:c6da0c80
[  158.755000] [<c009e410>] (sys_read+0x0/0x7c) from [<c0029e40>] 
(ret_fast_syscall+0x0/0x2c)
[  158.755000]  r6:000001ff r5:000ad008 r4:000ad008




More information about the openmoko-kernel mailing list