linux kernel 重启问题分析

godwww 2015-09-06 03:02:25
本人使用I2c iotcl做了60字节的i2c dma write,结果出现了死机重启现象
如下是我的log分析
[ 506.779972] (2)[3980:cxdish][cxdish1]ioctl txbuf[63] = 0x28
<6>[ 506.781793] (2)[3980:cxdish][cxdish1]ioctl dma write succes
<6>[ 506.781816] (2)[3980:cxdish][cxdish1]i = 1
<6>[ 506.781829] (2)[3980:cxdish][cxdish1]kfree rdwr_pa[d%].buf
<6>[ 506.781851] (2)[3980:cxdish][cxdish1]kfree data_ptrs
<6>[ 506.781870] (2)[3980:cxdish][cxdish1]kfree rdwr_pa
<6>[ 506.781889] (2)[3980:cxdish][cxdish1]ioctl rdrw ok!!
<4>[ 506.781910] -(2)[3980:cxdish][KERN Warning] Some Kernel ERROR or WARN occur and Force debug_lock off!
<4>[ 506.781930] -(2)[3980:cxdish][KERN Warning] check below backtrace first:
<4>[ 506.781946] -(2)[3980:cxdish]Backtrace:
<4>[ 506.781995] -(2)[3980:cxdish][<c00128e4>] (dump_backtrace+0x0/0x114) from [<c07e961c>] (dump_stack+0x20/0x24)
<4>[ 506.782016] -(2)[3980:cxdish] r6:c09b1100 r5:c0b82048 r4:c781e000 r3:271ae95f
<4>[ 506.782082] -(2)[3980:cxdish][<c07e95fc>] (dump_stack+0x0/0x24) from [<c02ea9fc>] (debug_locks_off+0x50/0x78)
<4>[ 506.782118] -(2)[3980:cxdish][<c02ea9ac>] (debug_locks_off+0x0/0x78) from [<c0052a08>] (oops_enter+0x1c/0x38)
<4>[ 506.782153] -(2)[3980:cxdish][<c00529ec>] (oops_enter+0x0/0x38) from [<c0012b28>] (die+0x40/0x2f0)
<4>[ 506.782189] -(2)[3980:cxdish][<c0012ae8>] (die+0x0/0x2f0) from [<c0012e00>] (arm_notify_die+0x28/0x60)
<4>[ 506.782223] -(2)[3980:cxdish][<c0012dd8>] (arm_notify_die+0x0/0x60) from [<c0008244>] (do_undefinstr+0xc4/0x1d4)
<4>[ 506.782257] -(2)[3980:cxdish][<c0008180>] (do_undefinstr+0x0/0x1d4) from [<c07f9d94>] (__und_svc_finish+0x0/0x2c)
<4>[ 506.782279] -(2)[3980:cxdish]Exception stack(0xc781fd70 to 0xc781fdb8)
<4>[ 506.782301] -(2)[3980:cxdish]fd60: 00000000 00000002 28006080 271ae95f
<4>[ 506.782327] -(2)[3980:cxdish]fd80: ccc06400 c0b82048 00000000 ffffffff ccc063e0 ccc06b00 00000040 c781fe04
<4>[ 506.782351] -(2)[3980:cxdish]fda0: c781fe08 c781fdf8 c05662f0 c0052754 200f0013 ffffffff
<4>[ 506.782385] -(2)[3980:cxdish][<c0052740>] (__stack_chk_fail+0x0/0x18) from [<c05662f0>] (i2cdev_ioctl_rdrw+0xfc/0x498)
<4>[ 506.782420] -(2)[3980:cxdish][<c05661f4>] (i2cdev_ioctl_rdrw+0x0/0x498) from [<c0566844>] (cxdish_i2cdev_ioctl+0x1b8/0x21c)
<4>[ 506.782459] -(2)[3980:cxdish][<c056668c>] (cxdish_i2cdev_ioctl+0x0/0x21c) from [<c0193e14>] (do_vfs_ioctl+0x94/0x5bc)
<4>[ 506.782479] -(2)[3980:cxdish] r6:00000003 r5:ca3bf000 r4:00000000
<4>[ 506.782534] -(2)[3980:cxdish][<c0193d80>] (do_vfs_ioctl+0x0/0x5bc) from [<c01943b8>] (sys_ioctl+0x7c/0x8c)
<4>[ 506.782569] -(2)[3980:cxdish][<c019433c>] (sys_ioctl+0x0/0x8c) from [<c000e480>] (ret_fast_syscall+0x0/0x40)
<4>[ 506.782589] -(2)[3980:cxdish] r8:c000e704 r7:00000036 r6:b6f20118 r5:b6f20178 r4:00000000
<4>[ 506.782650] -(2)[3980:cxdish]------------[ cut here ]------------
<2>[ 506.782669] -(2)[3980:cxdish]kernel BUG at /home/wuyongjun/workdir/MT8127/kernel/kernel/panic.c:481!
<0>[ 506.782689] -(2)[3980:cxdish]Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
<4>[ 506.782708] -(2)[3980:cxdish]Send IPI to stop CPUs...
<2>[ 506.782732] -(1)[1258:FinalizerDaemon]
<2>[ 506.782739] -(1)[1258:FinalizerDaemon] CPU1: stopping and cpu_relax,state:1
个人感觉好像是这个do_vfs_ioctl出错了,如果是这样的话,一般什么情况会导致这种情况?
...全文
507 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
godwww 2015-09-07
  • 打赏
  • 举报
回复
大神,受教了,听了你的建议我把栈上的局部变量用mollac写到堆上,果然有用,不重启了,大神我关注你一个
nswcfd 2015-09-06
  • 打赏
  • 举报
回复
__stack_chk_fail:大概是指内核栈上的局部变量太多,超过1~2个page了。

1,318

社区成员

发帖
与我相关
我的任务
社区描述
主要是开发驱动技术
社区管理员
  • 驱动程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧