diff options
author | Hou Pu <houpu.main@gmail.com> | 2021-05-20 19:30:45 +0800 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-05-26 16:18:22 +0200 |
commit | 25df1acd2d36eb72b14c3d00f6b861b1e00b3aab (patch) | |
tree | d09802badfaedcef448cb16caf31482c35a07345 | |
parent | 042a3eaad6daeabcfaf163aa44da8ea3cf8b5496 (diff) |
nvmet-tcp: fix inline data size comparison in nvmet_tcp_queue_response
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>
-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 f9f34f6caf5e..d8aceef83284 100644 --- a/drivers/nvme/target/tcp.c +++ b/drivers/nvme/target/tcp.c @@ -550,7 +550,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; } |