]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: fix kernel OOPs related to staged cs
authorfarah kassabri <fkassabri@habana.ai>
Wed, 1 Sep 2021 12:48:04 +0000 (15:48 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Tue, 14 Sep 2021 12:00:03 +0000 (15:00 +0300)
commitbf63535d2dc03923663b8a5edd9d830d40b14d47
tree675162c58b0b9ab8355cba4e91532e662ac8d039
parent92afa619582c7a38528e86e260c02f829642466c
habanalabs: fix kernel OOPs related to staged cs

In case of single staged cs with both first/last indications
set, we reach a scenario where in cs_release function flow
we don't cancel the TDR work before freeing the cs memory,
this lead to kernel OOPs since when the timer expires
the work pointer will be freed already.
In addition treat wait encaps cs "not found" handle
as "OK" for the user in order to keep the user interface
for both legacy and encpas signal/wait features the same.

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