linux/drivers/misc/habanalabs/common
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
..
mmu habanalabs: fix integer handling issue 2021-02-08 18:20:08 +02:00
pci habanalabs: Use 'dma_set_mask_and_coherent()' 2021-01-27 21:03:50 +02:00
asid.c habanalabs: replace WARN/WARN_ON with dev_crit in driver 2021-01-27 21:03:49 +02:00
command_buffer.c habanalabs: replace WARN/WARN_ON with dev_crit in driver 2021-01-27 21:03:49 +02:00
command_submission.c habanalabs: staged submission support 2021-01-27 21:03:51 +02:00
context.c habanalabs: modify device_idle interface 2021-01-27 21:03:51 +02:00
debugfs.c drivers: habanalabs: remove unused dentry pointer for debugfs files 2021-03-10 09:16:08 +01:00
device.c habanalabs: Disable file operations after device is removed 2021-03-10 09:16:09 +01:00
firmware_if.c habanalabs: update security map after init CPU Qs 2021-02-08 18:20:08 +02:00
habanalabs_drv.c habanalabs: register to pci shutdown callback 2020-12-28 08:47:39 +02:00
habanalabs_ioctl.c habanalabs: Disable file operations after device is removed 2021-03-10 09:16:09 +01:00
habanalabs.h drivers: habanalabs: remove unused dentry pointer for debugfs files 2021-03-10 09:16:08 +01:00
hw_queue.c habanalabs: staged submission support 2021-01-27 21:03:51 +02:00
hwmon.c habanalabs: firmware returns 64bit argument 2020-11-30 10:47:35 +02:00
irq.c habanalabs: mark hl_eq_inc_ptr() as static 2021-03-10 09:16:08 +01:00
Makefile habanalabs: separate common code to dedicated folders 2021-01-27 21:03:50 +02:00
memory.c Char/Misc driver patches for 5.12-rc1 2021-02-24 10:25:37 -08:00
sysfs.c habanalabs: firmware returns 64bit argument 2020-11-30 10:47:35 +02:00