sk_data_ready callback crashing, I have used in kmalloc with GFP_ATOMIC inside callback
but crashing with __might_sleep.
[ 57.916454 / 05-28 10:23:43.705][0] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[ 57.916464 / 05-28 10:23:43.705][0] Modules linked in: texfat(POE)
[ 57.916483 / 05-28 10:23:43.705][0] CPU: 0 PID: 2066 Comm: Binder:2048_1 Tainted: P W OE 4.4.63 #143
[ 57.916492 / 05-28 10:23:43.705][0] Hardware name: Qualcomm Technologies, Inc. MSM8998 v2.1 MTP (DT)
[ 57.916502 / 05-28 10:23:43.705][0] task: ffffffedc2554c80 ti: ffffffedc9708000 task.ti: ffffffedc9708000
[ 57.916521 / 05-28 10:23:43.705][0] PC is at ___might_sleep+0x134/0x144
[ 57.916530 / 05-28 10:23:43.705][0] LR is at ___might_sleep+0xf8/0x144
[ 57.916538 / 05-28 10:23:43.705][0] pc : [<ffffff8447ed2dcc>] lr : [<ffffff8447ed2d90>] pstate: 60400145
[ 57.917126 / 05-28 10:23:43.705][0] Call trace:
[ 57.917136 / 05-28 10:23:43.705][0] Exception stack(0xffffffedfdb4e080 to 0xffffffedfdb4e1b0)
[ 57.917147 / 05-28 10:23:43.705][0] e080: ffffffedc9708000 0000008000000000 00000000832ac000 ffffff8447ed2dcc
[ 57.917157 / 05-28 10:23:43.705][0] e0a0: 0000000000000006 0000000000000000 ffffffedfdb4e0d0 ffffff8447f09260
[ 57.917167 / 05-28 10:23:43.705][0] e0c0: 0000000000000000 ffffff844a810000 ffffffedfdb4e170 ffffff8447f09454
[ 57.917178 / 05-28 10:23:43.705][0] e0e0: ffffff8447f0940c ffffff84497712ab 000000000000053a 0000000000000000
[ 57.917190 / 05-28 10:23:43.705][0] e100: ffffffedebec1590 ffffff844868d0bc 000000000000000c ffffff84498a21b7
[ 57.917200 / 05-28 10:23:43.705][0] e120: 0000000000000140 0000000057ac6e9d 0000000000000102 0000000000000000
[ 57.917211 / 05-28 10:23:43.705][0] e140: 0000000000000000 ffffff8008180000 000000000000006a ffffff844a83a9b8
[ 57.917221 / 05-28 10:23:43.705][0] e160: ffffff84480efd38 372e33343a33323a 69205d305b5d3530 63696d6f74615f6e
[ 57.917231 / 05-28 10:23:43.705][0] e180: 69202c31203a2928 617369645f737172 203a292864656c62 0000000000000000
[ 57.917241 / 05-28 10:23:43.705][0] e1a0: ffffff8447ffb7b4 0000007f9da5e58c
[ 57.917251 / 05-28 10:23:43.705][0] [<ffffff8447ed2dcc>] ___might_sleep+0x134/0x144
[ 57.917261 / 05-28 10:23:43.705][0] [<ffffff8447ed2e58>] __might_sleep+0x7c/0x8c
[ 57.917275 / 05-28 10:23:43.705][0] [<ffffff8447fda74c>] kmem_cache_alloc_trace+0x60/0x25c
[ 57.917289 / 05-28 10:23:43.705][0] [<ffffff844868d0bc>] mausb_sock_data_ready+0x394/0x57c
[ 57.917303 / 05-28 10:23:43.705][0] [<ffffff8448fa79ec>] tcp_data_queue+0x55c/0xba8
[ 57.917312 / 05-28 10:23:43.705][0] [<ffffff8448fa8338>] tcp_rcv_established+0x300/0x6d8
[ 57.917325 / 05-28 10:23:43.705][0] [<ffffff8448fb11b0>] tcp_v4_do_rcv+0xf4/0x1f8
[ 57.917337 / 05-28 10:23:43.705][0] [<ffffff8448fb3c64>] tcp_v4_rcv+0x8a4/0xf38
[ 57.917349 / 05-28 10:23:43.705][0] [<ffffff8448f8e358>] ip_local_deliver_finish+0x118/0x224
[ 57.917359 / 05-28 10:23:43.705][0] [<ffffff8448f8e8e4>] ip_local_deliver+0xcc/0xe0
[ 57.917369 / 05-28 10:23:43.705][0] [<ffffff8448f8e698>] ip_rcv_finish+0x234/0x29c
[ 57.917380 / 05-28 10:23:43.705][0] [<ffffff8448f8ebe8>] ip_rcv+0x2f0/0x390
[ 57.975786 / 05-28 10:23:43.765][0] Kernel panic - not syncing: Fatal exception in interrupt
code:
static void sock_data_ready(struct sock *sk)
{
skb_buff_rcv.skb_data = kmalloc(packet_length, GFP_ATOMIC);// allocating memory and copying skb data
}
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies