Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 51a402fd authored by Yong Ding's avatar Yong Ding
Browse files

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: default avatarYong Ding <yongding@codeaurora.org>
parent e97015c2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment