diff options
author | Rajaravi Krishna Katta <rkatta@habana.ai> | 2021-09-14 18:28:48 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-09-29 12:18:48 +0300 |
commit | 4ca57d5139a0be3cf76c1667a4c0afb16d4a3b02 (patch) | |
tree | 077bdfbe423b148f1bda55dd978c708b52d1f797 /drivers/hwmon/occ/common.c | |
parent | bb8a4fcb2136508224c596a7e665bdba1d7c3c27 (diff) | |
download | linux-4ca57d5139a0be3cf76c1667a4c0afb16d4a3b02.tar.xz |
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>
Diffstat (limited to 'drivers/hwmon/occ/common.c')
0 files changed, 0 insertions, 0 deletions