linux/drivers/misc/habanalabs
Tomer Tayar ffd123fe83 habanalabs: Disable file operations after device is removed
A device can be removed from the PCI subsystem while a process holds the
file descriptor opened.
In such a case, the driver attempts to kill the process, but as it is
still possible that the process will be alive after this step, the
device removal will complete, and we will end up with a process object
that points to a device object which was already released.

To prevent the usage of this released device object, disable the
following file operations for this process object, and avoid the cleanup
steps when the file descriptor is eventually closed.
The latter is just a best effort, as memory leak will occur.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
2021-03-10 09:16:09 +01:00
..
common habanalabs: Disable file operations after device is removed 2021-03-10 09:16:09 +01:00
gaudi habanalabs/gaudi: don't enable clock gating on DMA5 2021-02-08 18:20:08 +02:00
goya habanalabs: return block size + block ID 2021-02-08 18:20:08 +02:00
include habanalabs: improve communication protocol with cpucp 2021-02-08 18:20:08 +02:00
Kconfig misc/habana: Stop using frame_vector helpers 2021-01-12 14:14:53 +01:00
Makefile habanalabs: create common folder 2020-07-24 20:31:37 +03:00