habanalabs: disable IRQ in user interrupts spinlock
authorOded Gabbay <ogabbay@kernel.org>
Fri, 20 Aug 2021 10:49:39 +0000 (13:49 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Wed, 1 Sep 2021 15:38:24 +0000 (18:38 +0300)
commit176d23a77edb7f10611bf61f1196abde119c7694
tree29a26937b894b4bfd8d50e27d38b2e7a106779cf
parent71731090ab17a208a58020e4b342fdfee280458a
habanalabs: disable IRQ in user interrupts spinlock

Because this spinlock is taken in an interrupt handler, we must use
the spin_lock_irqsave/irqrestore version to disable the interrupts
on the local CPU. Otherwise, we can have a potential deadlock (if
the interrupt handler is scheduled to run on the same cpu that the
code who took the lock was running on).

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/command_submission.c