]> 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)
commitae79466af134aa62201b168562292c0452519bd3
tree675162c58b0b9ab8355cba4e91532e662ac8d039
parentb217495af12b34da218d1027345cd26c58d4d7d4
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