求助,内核kmalloc问题
没怎么写过内核模块,今天写了个提示如下错误,自己比较菜,大家看看,谢谢
BUG: scheduling while atomic: mynetlink/0x10000100/19413
[<c0615ee7>] schedule+0x43/0xa55
[<c04074ce>] do_IRQ+0xb5/0xc3
[<c041f818>] __cond_resched+0x16/0x34
[<c061691f>] cond_resched+0x26/0x31
[<c0470467>] kmem_cache_alloc+0x11/0x4b
[<d9d0f31d>] pro_thread+0x191/0x2e0 [redirect]
[<c0404ffe>] syscall_exit_work+0x12/0x17
[<d9d0f18c>] pro_thread_thread+0x0/0x2e0 [redirect]
[<c0434907>] autoremove_wake_function+0x0/0x2d
[<d9d0f18c>] pro_thread_thread+0x0/0x2e0 [redirect]
[<c0405c53>] kernel_thread_helper+0x7/0x10
BUG: scheduling while atomic: mynetlink/0x10000100/19413
[<c0615ee7>] schedule+0x43/0xa55
[<c04074ce>] do_IRQ+0xb5/0xc3
[<c041f818>] __cond_resched+0x16/0x34
[<c061691f>] cond_resched+0x26/0x31
[<c0470467>] kmem_cache_alloc+0x11/0x4b
[<d9d0f31d>] pro_thread+0x191/0x2e0 [redirect]
[<c0404ffe>] syscall_exit_work+0x12/0x17
[<d9d0f18c>] pro_thread_thread+0x0/0x2e0 [redirect]
[<c0434907>] autoremove_wake_function+0x0/0x2d
[<d9d0f18c>] pro_thread_thread+0x0/0x2e0 [redirect]
[<c0405c53>] kernel_thread_helper+0x7/0x10
作者: guomsh 发布时间: 2011-05-21
通过netlink内核发数据,内核部分是kmalloc分配内存,看kmalloc不能在中断环境下使用,但是不明白什么样的是中断环境,指中断处理程序吗?
作者: guomsh 发布时间: 2011-05-21
补充一下,kmalloc第二个参数使用GFP_KERNEL
作者: guomsh 发布时间: 2011-05-21