android内核模块失败

时间:2017-06-17 03:22:04

标签: android module linux-kernel kernel kernel-module

使用insmod工具空内核模块编译的交叉的

arm-linux-androideabi-失败:

[10076.773188] c1 Unable to handle kernel NULL pointer dereference at virtual address 0000000c
[10076.773413] c1 pgd = e0de8000
[10076.773675] c1 [0000000c] *pgd=00000000
[10076.774155] c1 Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[10076.774345] c1 Modules linked in: hello_4(+) dhd tntfs(P)
[10076.775159] c1 CPU: 1    Tainted: P              (3.4.5-1572434 #1)
[10076.775365] c1 PC is at sys_init_module+0x15dc/0x1d34
[10076.775644] c1 LR is at mutex_lock+0x20/0x90
...
[10076.865997] c1 Backtrace: 
[10076.866315] c1 [<c007d35c>] (sys_init_module+0x0/0x1d34) from 
[<c000ed40>] (ret_fast_syscall+0x0/0x30)
[10076.866623] c1 Code: e15c0003 e2433008 0a00000a e1a06003 (e5963014) 
[10076.867140] c1 Board Information: SPC HW revision: 10, CPU EXYNOS5250 Rev1.0
[10076.867588] c1 ---[ end trace 6d11e1d2026a5e8c ]---
[10076.868028] c1 Kernel panic - not syncing: Fatal exception
[10076.868265] c0 CPU0: stopping

模块代码:

static int __init init_hello_4(void)
{
    return 0;
}
static void __exit cleanup_hello_4(void)
{
}
module_init(init_hello_4);
module_exit(cleanup_hello_4);

同时“Hello World”计划有效。可能是什么原因?

0 个答案:

没有答案