nvmet: for nvme admin set_features cmd, call nvmet_check_data_len_lte()

This is due to the fact that the host is allowed to pass the controller
an sgl describing a buffer that is larger than the payload itself

Signed-off-by: Amit Engel <Amit.Engel@dell.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Amit Engel 2023-01-04 10:44:32 +02:00 committed by Christoph Hellwig
parent 99607843e7
commit ddf9171769

View File

@ -840,7 +840,7 @@ void nvmet_execute_set_features(struct nvmet_req *req)
u16 nsqr;
u16 ncqr;
if (!nvmet_check_transfer_len(req, 0))
if (!nvmet_check_data_len_lte(req, 0))
return;
switch (cdw10 & 0xff) {