mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
nvme-fc: fix a missing queue put in nvmet_fc_ls_create_association
[ Upstream commit 0cab440487 ]
As part of nvmet_fc_ls_create_association there is a case where
nvmet_fc_alloc_target_queue fails right after a new association with an
admin queue is created. In this case, no one releases the get taken in
nvmet_fc_alloc_target_assoc. This fix is adding the missing put.
Signed-off-by: Amit Engel <Amit.Engel@dell.com>
Reviewed-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
55dbd6f4ea
commit
ecf5b49df3
@@ -1675,8 +1675,10 @@ nvmet_fc_ls_create_association(struct nvmet_fc_tgtport *tgtport,
|
|||||||
else {
|
else {
|
||||||
queue = nvmet_fc_alloc_target_queue(iod->assoc, 0,
|
queue = nvmet_fc_alloc_target_queue(iod->assoc, 0,
|
||||||
be16_to_cpu(rqst->assoc_cmd.sqsize));
|
be16_to_cpu(rqst->assoc_cmd.sqsize));
|
||||||
if (!queue)
|
if (!queue) {
|
||||||
ret = VERR_QUEUE_ALLOC_FAIL;
|
ret = VERR_QUEUE_ALLOC_FAIL;
|
||||||
|
nvmet_fc_tgt_a_put(iod->assoc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user