Skip to content

Commit d19b8bc

Browse files
jsmart-ghaxboe
authored andcommitted
nvme-fc: fix request private initialization
The patch made to avoid Coverity reporting of out of bounds access on aen_op moved the assignment of a pointer, leaving it null when it was subsequently used to calculate a private pointer. Thus the private pointer was bad. Move/correct the private pointer initialization to be in sync with the patch. Fixes: 0d2bdf9 ("nvme-fc: rework the request initialization code") Signed-off-by: James Smart <jsmart2021@gmail.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent b5f2954 commit d19b8bc

File tree

1 file changed

+1
-1
lines changed
  • drivers/nvme/host

1 file changed

+1
-1
lines changed

drivers/nvme/host/fc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,6 @@ __nvme_fc_init_request(struct nvme_fc_ctrl *ctrl,
17041704
op->fcp_req.rspaddr = &op->rsp_iu;
17051705
op->fcp_req.rsplen = sizeof(op->rsp_iu);
17061706
op->fcp_req.done = nvme_fc_fcpio_done;
1707-
op->fcp_req.private = &op->fcp_req.first_sgl[SG_CHUNK_SIZE];
17081707
op->ctrl = ctrl;
17091708
op->queue = queue;
17101709
op->rq = rq;
@@ -1752,6 +1751,7 @@ nvme_fc_init_request(struct blk_mq_tag_set *set, struct request *rq,
17521751
if (res)
17531752
return res;
17541753
op->op.fcp_req.first_sgl = &op->sgl[0];
1754+
op->op.fcp_req.private = &op->priv[0];
17551755
return res;
17561756
}
17571757

0 commit comments

Comments
 (0)