linux kernel - BUG: sleeping function called from invalid context at mm/slub.c:1719 -
i have allocated pointer
int *ptr = kmalloc(sizeof(int), gfp_atomic); and pointer deallocated in timer function having 5 second timeout value.
if( null != ptr ) { kfree(ptr); ptr = null; } please advise me wrong here.. thanking in advance.
kfree() must not used in atomic context, such timer function.
move context, such workqueue.
Comments
Post a Comment