Quick question.
- Ethernet driver raise IRQ.
- ISR will schedule tasklet (BH)
- There is critical section between this tasklet and some kernel context (which is trigger by "ioctl")
- KERNEL_PREEMPTION is disabled / But CONFIG_SMP is enabled (2 CPUs)
In this situation, should I use "spin_lock_bh"?
Since preemption is "disabled", even though kernel context holds "spin_lock", tasklet cannot preempt the kernel context which is calling ioctl and this kernel context is kind of "safe" from BH.
or is it possible for following scenario to happen?
When this kernel context is getting serviced, IRQ comes and ISR will schedule tasklet. Then, after returning from IRQ, kernel schedule will pickup tasklet even though there is kernel context.
I'm not sure which one is correct?