OpenCloudOS-Kernel/drivers/misc/habanalabs/common
Rajaravi Krishna Katta 4ca57d5139 habanalabs: fix resetting args in wait for CS IOCTL
In wait for CS IOCTL code, the driver resets the incoming args structure
before returning to the user, regardless of the return value of the
IOCTL.

In case the IOCTL returns EINTR, resetting the args will result in error
in case the userspace will repeat the ioctl call immediately (which is
the behavior in the hl-thunk userspace library).

The solution is to reset the args only if the driver returns success (0)
as a return value for the IOCTL.

Signed-off-by: Rajaravi Krishna Katta <rkatta@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
2021-09-29 12:18:48 +03:00
..
mmu habanalabs: fix nullifying of destroyed mmu pgt pool 2021-08-29 09:47:46 +03:00
pci habanalabs: set dma max segment size 2021-08-29 09:47:47 +03:00
Makefile habanalabs: expose state dump 2021-08-29 09:47:46 +03: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: cannot sleep while holding spinlock 2021-09-01 18:38:24 +03:00
command_submission.c habanalabs: fix resetting args in wait for CS IOCTL 2021-09-29 12:18:48 +03:00
context.c habanalabs: remove redundant warning message 2021-08-29 09:47:48 +03:00
debugfs.c habanalabs: add userptr_lookup node in debugfs 2021-09-01 18:38:24 +03:00
device.c habanalabs: add support for f/w reset 2021-09-01 18:38:24 +03:00
firmware_if.c habanalabs/gaudi: increase boot fit timeout 2021-09-01 18:38:24 +03:00
habanalabs.h habanalabs: add support for f/w reset 2021-09-01 18:38:24 +03:00
habanalabs_drv.c habanalabs: add support for f/w reset 2021-09-01 18:38:24 +03:00
habanalabs_ioctl.c habanalabs: expose server type in INFO IOCTL 2021-09-01 18:38:24 +03:00
hw_queue.c habanalabs: fix wait offset handling 2021-09-14 15:00:04 +03:00
hwmon.c habanalabs: firmware returns 64bit argument 2020-11-30 10:47:35 +02:00
irq.c habanalabs: check running index in eqe control 2021-06-18 15:23:40 +03:00
memory.c habanalabs: cannot sleep while holding spinlock 2021-09-01 18:38:24 +03:00
state_dump.c habanalabs: state dump monitors and fences infrastructure 2021-08-29 09:47:46 +03:00
sysfs.c habanalabs: add "in device creation" status 2021-09-01 18:38:24 +03:00