diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2020-09-04 21:18:58 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2020-09-04 21:28:59 -0700 |
| commit | 44a8c4f33c0073ca614db79f22e023811bdd0f3c (patch) | |
| tree | 2d29271961a485f621bd14294ec57e816290541e /drivers/misc/habanalabs/common/command_submission.c | |
| parent | 3ab1270bfa1e8ae7db0d46fee90c5db2935ac91b (diff) | |
| parent | c70672d8d316ebd46ea447effadfe57ab7a30a50 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
We got slightly different patches removing a double word
in a comment in net/ipv4/raw.c - picked the version from net.
Simple conflict in drivers/net/ethernet/ibm/ibmvnic.c. Use cached
values instead of VNIC login response buffer (following what
commit 507ebe6444a4 ("ibmvnic: Fix use-after-free of VNIC login
response buffer") did).
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common/command_submission.c')
| -rw-r--r-- | drivers/misc/habanalabs/common/command_submission.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/common/command_submission.c b/drivers/misc/habanalabs/common/command_submission.c index b9840e368eb5..2e3fcbc794db 100644 --- a/drivers/misc/habanalabs/common/command_submission.c +++ b/drivers/misc/habanalabs/common/command_submission.c @@ -808,6 +808,14 @@ static int cs_ioctl_signal_wait(struct hl_fpriv *hpriv, enum hl_cs_type cs_type, /* currently it is guaranteed to have only one chunk */ chunk = &cs_chunk_array[0]; + + if (chunk->queue_index >= hdev->asic_prop.max_queues) { + dev_err(hdev->dev, "Queue index %d is invalid\n", + chunk->queue_index); + rc = -EINVAL; + goto free_cs_chunk_array; + } + q_idx = chunk->queue_index; hw_queue_prop = &hdev->asic_prop.hw_queues_props[q_idx]; q_type = hw_queue_prop->type; |