nvme-fc: fix error loop in create_hw_io_queues
Subsystems (2)
PATCH 1/1 nvme-fc: fix error loop in create_hw_io_queues
The loop that backs out of hw io queue creation continues through index 0, which corresponds to the admin queue as well.
Fix the loop so it only proceeds through indexes 1..n which correspond to io queues.
--- drivers/nvme/host/fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/fc.c +1 -1
@@ -2314,7 +2314,7 @@ nvme_fc_create_hw_io_queues(struct nvme_fc_ctrl *ctrl, u16 qsize)return 0 ; delete_queues: -for (; i >=0 ; i--) +for (; i >0 ; i--)__nvme_fc_delete_hw_queue (ctrl, &ctrl->queues[i], i);return ret; }
Signature · 1 line
2.26.2
_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Quoted 18 lines · James Smart
The loop that backs out of hw io queue creation continues through index 0, which corresponds to the admin queue as well.
Fix the loop so it only proceeds through indexes 1..n which correspond to io queues.
Signed-off-by James Smart <[email protected]>--- drivers/nvme/host/fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/nvme/host/fc.c +0
-0
drivers/nvme/host/fc.c nvme_fc_create_hw_io_queues(struct nvme_fc_ctrl *ctrl, u16 qsize) · line 2320
Quoted 8 lines
drivers/nvme/host/fc.c +1
-1@@ -2314,7 +2314,7 @@ nvme_fc_create_hw_io_queues(struct nvme_fc_ctrl *ctrl, u16 qsize)return 0 ; delete_queues: -for (; i >=0 ; i--) +for (; i >0 ; i--)__nvme_fc_delete_hw_queue (ctrl, &ctrl->queues[i], i);return ret; }
Cheers,
Hannes
Signature · 9 lines
Dr. Hannes Reinecke Kernel Storage Architect [email protected] +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
Quoted 25 lines · James Smart
The loop that backs out of hw io queue creation continues through index 0, which corresponds to the admin queue as well.
Fix the loop so it only proceeds through indexes 1..n which correspond to io queues.
Signed-off-by James Smart <[email protected]>---
drivers/nvme/host/fc.c| 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/nvme/host/fc.c +0
-0@@ -2314,7 +2314,7 @@ nvme_fc_create_hw_io_queues(struct nvme_fc_ctrl *ctrl, u16 qsize)return 0 ;
delete_queues:drivers/nvme/host/fc.c +1
-1-for (; i >=0 ; i--) +for (; i >0 ; i--)
Quoted 10 lines
__nvme_fc_delete_hw_queue(ctrl, &ctrl->queues[i], i); return ret; }Signature · 6 lines
2.26.2 _______________________________________________ Linux-nvme mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-nvme
--
Himanshu Madhani Oracle Linux Engineering
_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Christoph Hellwig
AppliedThanks,
applied.
_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme