Kernel BUG at slab.c:1128!
when i am going to add some code in the linux kernel source code, i meet such questions:
kernel BUG at slab.c: 1128
Kernel panic: Aiee, killing interrupt handler!
In interrupt handler -not syncing.
Reading from slab.c 1128, there is a check -in_interrupt(), have called some fuctions in the interrupt handler?
But i just use "Kmalloc" to allocate some memory, is it the matter?
Quoted 11 lines · Zhenyu Wu
when i am going to add some code in the linux kernel source code, i meet such questions:
kernel BUG at
slab.c: 1128Kernel panic: Aiee, killing interrupt handler!In interrupt handler -not syncing.
Reading from
slab.c1128, there is a check -in_interrupt(), have called some fuctions in the interrupt handler?
But i just use "Kmalloc" to allocate some memory, is it the matter?
If you want to call kmalloc from interrupt context you have to do it with the GFP_ATOMIC flag to specify that you do not want to sleep, in which case there is an increased chance that your request won't be met so you have to have error handling in case of allocation failure.