]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: rate limit error msg on waiting for CS
authorOded Gabbay <oded.gabbay@gmail.com>
Tue, 3 Dec 2019 08:12:10 +0000 (10:12 +0200)
committerOded Gabbay <oded.gabbay@gmail.com>
Sat, 14 Dec 2019 13:12:21 +0000 (15:12 +0200)
commitcdc4fb1422e38d1b79fb95b7ae3d92ca0a8a6e93
treef6ea45a670b7d7e81b16b831e864ca731fe5f987
parent1ce4555b7f8484587f39b13fd53d745aa4b3207c
habanalabs: rate limit error msg on waiting for CS

In case a user submits a CS, and the submission fails, and the user doesn't
check the return value and instead use the error return value as a valid
sequence number of a CS and ask to wait on it, the driver will print an
error and return an error code for that wait.

The real problem happens if now the user ignores the error of the wait, and
try to wait again and again. This can lead to a flood of error messages
from the driver and even soft lockup event.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Tomer Tayar <ttayar@habana.ai>
drivers/misc/habanalabs/command_submission.c
drivers/misc/habanalabs/context.c