TA的每日心情 | 奋斗 2015-10-8 09:49 |
---|
签到天数: 430 天 连续签到: 1 天 [LV.9]以坛为家II
|
本帖最后由 bruce_helen 于 2014-7-2 22:16 编辑
可能大家在使用RioTboard的过程中也发现了,在终端中输入reboot命令,内核会segmentation fault。
看下图
Unable to handle kernel NULL pointer dereference at virtual address 00000014
pgd = bfa24000
通过内核打印出的log,我们大致能看出问题应该出在i2c的core_shutdown函数中,通过查找发现在drivers\input\touchscreen\generic_ts_rel\Core_i2c.c 633行
这个函数在调用时没有检查获取的值是不是NULL,如果是NULL,那么会导致内核segmentation fault。RioTboard板子恰巧没有触摸屏,可能是这部分代码没有初始化成功,导致这里获取的值为空。
将core_shutdown函数加上值是不是为空的判断即可。
附内核崩溃log:
Stopping inetd:
Terminated
Unmounting filesystems
umount: mdev busy - remounted read-only
doing udev...exit
chown: /home/user/.rhosts: Read-only file system
chown: /home/user: Read-only file system
chown: /home/user: Read-only file system
cat: can't open '/proc/devices': No such file or directory
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to all processesUnable to handle kernel NULL pointer dereference at virtual address 00000014
pgd = bfa24000
[00000014] *pgd=4fa1b831, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 Not tainted (3.0.35 #8)
PC is at core_shutdown+0x10/0x3c
LR is at core_shutdown+0x10/0x3c
pc : [<8034c574>] lr : [<8034c574>] psr: a0000013
sp : bf9c1e60 ip : 00000000 fp : 00000000
r10: 00000000 r9 : bf9c0000 r8 : 80043144
r7 : 00000000 r6 : 80b62864 r5 : bfce2a20 r4 : bfce2a00
r3 : 8034c564 r2 : bfce2a00 r1 : 00000000 r0 : 00000000
Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 10c53c7d Table: 4fa2404a DAC: 00000015
Process init (pid: 1457, stack limit = 0xbf9c02f0)
Stack: (0xbf9c1e60 to 0xbf9c2000)
1e60: bfce2a2c 80352674 80352638 80296d38 00000000 80b070c4 00000000 80087e14
1e80: 01234567 80087e28 4321fedc 80087f78 00000000 00000000 00000000 00000000
1ea0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1ec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1ee0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1f00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1f20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1f40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
1f80: 00000000 00000000 bf9c0000 8c008f40 bf9c1fac 00000000 00000000 ffffffff
1fa0: 00000058 80042fc0 00000000 00000000 fee1dead 28121969 01234567 00000000
1fc0: 00000000 00000000 ffffffff 00000058 00000330 00000000 000d35b0 00000000
1fe0: 000fc29c 7e83e984 000bdbd0 2ad7e4a0 60000010 fee1dead 00000000 00000000
[<8034c574>] (core_shutdown+0x10/0x3c) from [<80352674>] (i2c_device_shutdown+0x3c/0x44)
[<80352674>] (i2c_device_shutdown+0x3c/0x44) from [<80296d38>] (device_shutdown+0x94/0xec)
[<80296d38>] (device_shutdown+0x94/0xec) from [<80087e14>] (kernel_restart_prepare+0x30/0x38)
[<80087e14>] (kernel_restart_prepare+0x30/0x38) from [<80087e28>] (kernel_restart+0xc/0x48)
[<80087e28>] (kernel_restart+0xc/0x48) from [<80087f78>] (sys_reboot+0x10c/0x1c4)
[<80087f78>] (sys_reboot+0x10c/0x1c4) from [<80042fc0>] (ret_fast_syscall+0x0/0x30)
Code: e92d4010 e1a04000 e2800020 ebfd2f7e (e5d02014)
BUG: scheduling while atomic: init/1457/0x00000002
Modules linked in:
[<80049834>] (unwind_backtrace+0x0/0xf8) from [<8054481c>] (__schedule+0x4c0/0x6c0)
[<8054481c>] (__schedule+0x4c0/0x6c0) from [<80544ffc>] (schedule_timeout+0x14c/0x1e8)
[<80544ffc>] (schedule_timeout+0x14c/0x1e8) from [<800832ec>] (msleep+0x14/0x20)
[<800832ec>] (msleep+0x14/0x20) from [<803b0448>] (ipu_init_sync_panel+0x13c/0x1330)
[<803b0448>] (ipu_init_sync_panel+0x13c/0x1330) from [<8026173c>] (mxcfb_set_par+0x3fc/0x700)
[<8026173c>] (mxcfb_set_par+0x3fc/0x700) from [<80261ae4>] (mxcfb_blank+0xa4/0xb8)
[<80261ae4>] (mxcfb_blank+0xa4/0xb8) from [<8024a234>] (fb_blank+0x3c/0x68)
[<8024a234>] (fb_blank+0x3c/0x68) from [<80254028>] (fbcon_blank+0x1c4/0x258)
[<80254028>] (fbcon_blank+0x1c4/0x258) from [<80287ee8>] (do_unblank_screen+0x94/0x194)
[<80287ee8>] (do_unblank_screen+0x94/0x194) from [<8023ba24>] (bust_spinlocks+0x24/0x4c)
[<8023ba24>] (bust_spinlocks+0x24/0x4c) from [<800465a4>] (die+0xa8/0x284)
[<800465a4>] (die+0xa8/0x284) from [<8054040c>] (__do_kernel_fault.part.4+0x54/0x74)
[<8054040c>] (__do_kernel_fault.part.4+0x54/0x74) from [<8004d40c>] (do_page_fault+0x2b4/0x31c)
[<8004d40c>] (do_page_fault+0x2b4/0x31c) from [<8003d384>] (do_DataAbort+0x34/0x9c)
[<8003d384>] (do_DataAbort+0x34/0x9c) from [<80042990>] (__dabt_svc+0x70/0xa0)
Exception stack(0xbf9c1e18 to 0xbf9c1e60)
1e00: 00000000 00000000
1e20: bfce2a00 8034c564 bfce2a00 bfce2a20 80b62864 00000000 80043144 bf9c0000
1e40: 00000000 00000000 00000000 bf9c1e60 8034c574 8034c574 a0000013 ffffffff
[<80042990>] (__dabt_svc+0x70/0xa0) from [<8034c574>] (core_shutdown+0x10/0x3c)
[<8034c574>] (core_shutdown+0x10/0x3c) from [<80352674>] (i2c_device_shutdown+0x3c/0x44)
[<80352674>] (i2c_device_shutdown+0x3c/0x44) from [<80296d38>] (device_shutdown+0x94/0xec)
[<80296d38>] (device_shutdown+0x94/0xec) from [<80087e14>] (kernel_restart_prepare+0x30/0x38)
[<80087e14>] (kernel_restart_prepare+0x30/0x38) from [<80087e28>] (kernel_restart+0xc/0x48)
[<80087e28>] (kernel_restart+0xc/0x48) from [<80087f78>] (sys_reboot+0x10c/0x1c4)
[<80087f78>] (sys_reboot+0x10c/0x1c4) from [<80042fc0>] (ret_fast_syscall+0x0/0x30)
---[ end trace 03327dbd17c69f80 ]---
参考:http://www.element14.com/community/thread/32283/l/reboot-of-the-linux-os-run-into-segmentation-fault
|
|