kernel init & cleanup module: can i use locks?
I am writing kernel module and i am allocating memory using kmalloc in init and in cleanup i use kfree.
1) can i use semaphore lock in init around kmalloc
2) can i use spinlock in cleanup around kfree?
3) locks are not required in init and cleanup functions?