diff options
author | Amit Engel <Amit.Engel@dell.com> | 2023-01-04 11:44:32 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2023-02-01 16:22:00 +0300 |
commit | ddf91717693f1ac524329a88f86ab09e66b18cbe (patch) | |
tree | adc811f7b612fe7978597ec5832b3dd05b80a81f /drivers/nvme/target | |
parent | 99607843e7ed8ffeffc1010bd8001087db756535 (diff) | |
download | linux-ddf91717693f1ac524329a88f86ab09e66b18cbe.tar.xz |
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>
Diffstat (limited to 'drivers/nvme/target')
-rw-r--r-- | drivers/nvme/target/admin-cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c index 6a54ed6fb121..80099df37314 100644 --- a/drivers/nvme/target/admin-cmd.c +++ b/drivers/nvme/target/admin-cmd.c @@ -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) { |