Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c820ad4c authored by James Smart's avatar James Smart Committed by Jens Axboe
Browse files

nvmet_fc: Clear SG list to avoid double frees



Clear SG list to avoid double frees of payload page list

Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent f77fc87c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1624,6 +1624,8 @@ nvmet_fc_free_tgt_pgs(struct nvmet_fc_fcp_iod *fod)
	for_each_sg(fod->data_sg, sg, fod->data_sg_cnt, count)
		__free_page(sg_page(sg));
	kfree(fod->data_sg);
	fod->data_sg = NULL;
	fod->data_sg_cnt = 0;
}