“Scheduling while atomic” indicates that you’ve tried to sleep somewhere that you shouldn’t – like within a spinlock-protected critical section or an interrupt handler.
Common examples of things that can sleep are mutex_lock()
, kmalloc(..., GFP_KERNEL)
, get_user()
and put_user()
.