linux-stable/drivers/misc/habanalabs
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
..
common habanalabs: fix resetting args in wait for CS IOCTL 2021-09-29 12:18:48 +03:00
gaudi habanalabs/gaudi: fix LBW RR configuration 2021-09-14 15:00:04 +03:00
goya habanalabs: add support for f/w reset 2021-09-01 18:38:24 +03:00
include habanalabs/gaudi: use direct MSI in single mode 2021-09-14 15:00:03 +03: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