soc: qcom: hab: use spin_lock/unlock() when local irqs are disabled
In habmm_socket_read/write(), spin_lock/unlock_bh() are naturally used
to handle the race between the tasklet, as bottom half, and process
context.
Sometimes and rarely, some kernel-space drivers(e.g., scm_qcpe.c, apr_vm.c)
could call habmm_socket_read/write() from the process context where local
irqs are disabled(e.g., spin_lock_irqsave is called).
In such case, spin_unlock_bh() will trigger such below warning log,
warning: kernel/softirq.c:157 WARN_ON_ONCE(in_irq() || irqs_disabled()).
Actually in such case, no need for HAB to disable and enable bottom half
considering the fact that local irqs are already disabled from the caller.
Change-Id: I20c37b12b3ce7ad1ebd6f8245f9e55aa2fa215b6
Signed-off-by:
Yong Ding <yongding@codeaurora.org>
Loading
Please register or sign in to comment