projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3688feb
)
nvmet-fc: ensure target queue id within range.
author
James Smart
<
[email protected]
>
Tue, 19 Sep 2017 23:33:56 +0000
(16:33 -0700)
committer
Jens Axboe
<
[email protected]
>
Mon, 25 Sep 2017 18:42:11 +0000
(12:42 -0600)
When searching for queue id's ensure they are within the expected range.
Signed-off-by: James Smart <
[email protected]
>
Signed-off-by: Christoph Hellwig <
[email protected]
>
Signed-off-by: Jens Axboe <
[email protected]
>
drivers/nvme/target/fc.c
patch
|
blob
|
history
diff --git
a/drivers/nvme/target/fc.c
b/drivers/nvme/target/fc.c
index 6850672ad2a2ae16c378a30b04e6ddc7ece5b1a6..58e010bdda3ea5c155da5c268f542a6939e5c786 100644
(file)
--- a/
drivers/nvme/target/fc.c
+++ b/
drivers/nvme/target/fc.c
@@
-783,6
+783,9
@@
nvmet_fc_find_target_queue(struct nvmet_fc_tgtport *tgtport,
u16 qid = nvmet_fc_getqueueid(connection_id);
unsigned long flags;
+ if (qid > NVMET_NR_QUEUES)
+ return NULL;
+
spin_lock_irqsave(&tgtport->lock, flags);
list_for_each_entry(assoc, &tgtport->assoc_list, a_list) {
if (association_id == assoc->association_id) {