> the hang of it and it works fine. Only I get warnings saying:
> kmem_grow: Called nonatomically from int - size-64
It is not a warning, it is fatal error.
> My question is: what should I add to avoid this?
Do not use non-atomic operations in atomic context.
> Is a pair of start_bh_atomic() end_bh_atomic() calls missing?
enqueue/dequeue are already BH protected.
> What should be
> protected with these functions at all? (And what needn't?)
They are already serialized, so that enqueue/dequeue need not
any additional protection.
> If you need a part of code, I gladly send it...
Please. Though, check first the module for GFP_KERNEL and for
balanced start_bh_atomic and end_bh_atomic.