3.7. Locking Between Tasklets/Timers

Sometimes a tasklet or timer might want to share data with another tasklet or timer.

3.7.1. The Same Tasklet/Timer

Since a tasklet is never run on two CPUs at once, you don't need to worry about your tasklet being reentrant (running twice at once), even on SMP.

3.7.2. Different Tasklets/Timers

If another tasklet/timer wants to share data with your tasklet or timer , you will both need to use spin_lock() and spin_unlock() calls. spin_lock_bh() is unnecessary here, as you are already in a tasklet, and none will be run on the same CPU.