]> Git Repo - linux.git/commitdiff
nvmet-tcp: fix inline data size comparison in nvmet_tcp_queue_response
authorHou Pu <[email protected]>
Thu, 20 May 2021 11:30:45 +0000 (19:30 +0800)
committerChristoph Hellwig <[email protected]>
Wed, 26 May 2021 14:18:22 +0000 (16:18 +0200)
Using "<=" instead "<" to compare inline data size.

Fixes: bdaf13279192 ("nvmet-tcp: fix a segmentation fault during io parsing error")
Signed-off-by: Hou Pu <[email protected]>
Reviewed-by: Sagi Grimberg <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
drivers/nvme/target/tcp.c

index f9f34f6caf5e8c4d7f7bfa9a2af8687bb464f221..d8aceef83284680fbfeae752154eeea37b6f2960 100644 (file)
@@ -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;
        }
This page took 0.064175 seconds and 4 git commands to generate.