1、Make sure this copying happens inside the critical section by holding a spinlock.

2、Finally, if your kernel thread shares data with a bottom half, then you can use another variant of the spinlock.

3、The spinlock is needed here, because the kernel thread will be running independently and will access the global structure.