Re: [PATCH 1/2] nvme-tcp: validate R2T PDU in nvme_tcp_handle_r2t()
From: Sagi Grimberg <sagi@grimberg.me>
Date: 2021-11-22 11:47:38
From: Sagi Grimberg <sagi@grimberg.me>
Date: 2021-11-22 11:47:38
@@ -2321,6 +2327,9 @@ static blk_status_t nvme_tcp_setup_cmd_pdu(struct nvme_ns *ns, req->data_sent = 0; req->pdu_len = 0; req->pdu_sent = 0; + req->h2cdata_left = 0; + req->h2cdata_offset = 0; + req->h2cdata_ttag = 0;
This doesn't hurt anything, but it also redundant AFAICT no? these are only referenced in nvme_tcp_setup_h2c_data_pdu which is called from nvme_tcp_handle_r2t, which is setting these right before the call...