habanalabs: fix race between wait and irq
authorOded Gabbay <ogabbay@kernel.org>
Tue, 18 Jan 2022 22:10:43 +0000 (00:10 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 28 Feb 2022 12:22:03 +0000 (14:22 +0200)
commit7a78d4d4819ec75c749d591c432d50cf7003448b
tree06c73fd87cff2b899afcf61f8b1508540522a4be
parent54faa5607b549ef7ef735e7d0c4523cc74bd20f4
habanalabs: fix race between wait and irq

There is a race in the user interrupts code, where between checking
the target value and adding the new pend to the list, there is a chance
the interrupt happened.

In that case, no one will complete the node, and we will get a timeout
on it.

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