linux/drivers/misc/habanalabs
farah kassabri a78b07dcae habanalabs: Fix reset upon device release bug
In case user application was interrupted while some cs still in-flight
or in the middle of completion handling in driver, the
last refcount of the kernel private data for the user process
will not be put in the fd close flow, but in the cs completion
workqueue context.

This means that the device reset-upon-device-release will be called
from that context. During the reset flow, the driver flushes all the cs
workqueue to ensure that any scheduled work has run to completion,
and since we are running from the completion context we will
have deadlock.

Therefore, we need to skip flushing the workqueue in those cases.
It is safe to do it because the user won't be able to release the device
unless the workqueues are already empty.

Signed-off-by: farah kassabri <fkassabri@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
2022-02-28 14:22:06 +02:00
..
common habanalabs: Fix reset upon device release bug 2022-02-28 14:22:06 +02:00
gaudi habanalabs/gaudi: add missing handling of NIC related events 2022-02-28 14:22:05 +02:00
goya habanalabs: allow user to set allocation page size 2022-02-28 14:22:05 +02:00
include habanalabs/gaudi: add missing handling of NIC related events 2022-02-28 14:22:05 +02:00
Kconfig habanalabs: select CRC32 2021-10-18 12:05:47 +03:00
Makefile habanalabs: create common folder 2020-07-24 20:31:37 +03:00