diff options
author | Hou Pu <houpu.main@gmail.com> | 2021-05-20 14:30:45 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-03 10:09:38 +0300 |
commit | 981e08ad823e0ca28d6f979d7359d6eaaee1c2c8 (patch) | |
tree | 068bdae374de18d1ae87f5b257d82a244648f990 /drivers | |
parent | 2a4115d43df4b2f740e93ce5e77e5544416e2065 (diff) | |
download | linux-981e08ad823e0ca28d6f979d7359d6eaaee1c2c8.tar.xz |
nvmet-tcp: fix inline data size comparison in nvmet_tcp_queue_response
commit 25df1acd2d36eb72b14c3d00f6b861b1e00b3aab upstream.
Using "<=" instead "<" to compare inline data size.
Fixes: bdaf13279192 ("nvmet-tcp: fix a segmentation fault during io parsing error")
Signed-off-by: Hou Pu <houpu.main@gmail.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/nvme/target/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c index d958b5da9b88..4df4f37e6b89 100644 --- a/drivers/nvme/target/tcp.c +++ b/drivers/nvme/target/tcp.c @@ -538,7 +538,7 @@ static void nvmet_tcp_queue_response(struct nvmet_req *req) * nvmet_req_init is completed. */ if (queue->rcv_state == NVMET_TCP_RECV_PDU && - len && len < cmd->req.port->inline_data_size && + len && len <= cmd->req.port->inline_data_size && nvme_is_write(cmd->req.cmd)) return; } |