habanalabs: fix handling of wait CS for interrupting signals
authorTomer Tayar <ttayar@habana.ai>
Sun, 4 Dec 2022 20:09:08 +0000 (22:09 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Thu, 26 Jan 2023 08:56:22 +0000 (10:56 +0200)
commitdd7a82b52cc16c110269c608533ec1ee47d342fd
tree9fe7473bbf5bca04b1465dc74ff13c8f6ddca98e
parent5f8ee3c98ed31b60bffdd332d38ff3a27b9f2609
habanalabs: fix handling of wait CS for interrupting signals

The -ERESTARTSYS return value is not handled correctly when a signal is
received while waiting for CS completion.
This can lead to bad output values to user when waiting for a single CS
completion, and more severe, it can cause a non-stopping loop when
waiting to multi-CS completion and until a CS timeout.

Fix the handling and exit the waiting if this return value is received.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/command_submission.c