habanalabs: prevent possible out-of-bounds array access
authorOded Gabbay <oded.gabbay@gmail.com>
Sun, 12 Jul 2020 20:34:57 +0000 (23:34 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Sun, 19 Jul 2020 05:15:36 +0000 (08:15 +0300)
commitcea7a0449ea3fa4883bf5dc8397f000d6b67d6cd
treeeabadfa2f4bb3c8eefe64c11e803ad5fd7d4c015
parentb279b1fe5799cf653de3822ca253f5d21639d90a
habanalabs: prevent possible out-of-bounds array access

Queue index is received from the user. Therefore, we must validate it
before using it to access the queue props array.

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