Commit 25df1acd authored by Hou Pu's avatar Hou Pu Committed by Christoph Hellwig

nvmet-tcp: fix inline data size comparison in nvmet_tcp_queue_response

Using "<=" instead "<" to compare inline data size.

Fixes: bdaf1327 ("nvmet-tcp: fix a segmentation fault during io parsing error")
Signed-off-by: default avatarHou Pu <houpu.main@gmail.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 042a3eaa
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment