mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
nvmet-tcp: fix inline data size comparison in nvmet_tcp_queue_response
commit25df1acd2dupstream. Using "<=" instead "<" to compare inline data size. Fixes:bdaf132791("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e31975c346
commit
cb554bbf36
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user