From: Varun Prakash <varun@chelsio.com>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: hch@lst.de, kbusch@kernel.org, linux-nvme@lists.infradead.org
Subject: Re: [PATCH 1/2] nvme-tcp: validate R2T PDU in nvme_tcp_handle_r2t()
Date: Mon, 22 Nov 2021 20:04:27 +0530 [thread overview]
Message-ID: <20211122143425.GA1716@chelsio.com> (raw)
In-Reply-To: <76c6cd6b-8846-a9c9-d0b7-00405fe63740@grimberg.me>
On Mon, Nov 22, 2021 at 12:45:14PM +0200, Sagi Grimberg wrote:
>
> >@@ -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...
if (req->h2cdata_left) check will also execute for inline data, can it
have a garbage value if driver does not set it to 0?
We can remove h2cdata_offset and h2cdata_ttag as these will be used only for
h2cdata.
next prev parent reply other threads:[~2021-11-22 14:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-22 10:12 [PATCH 1/2] nvme-tcp: validate R2T PDU in nvme_tcp_handle_r2t() Varun Prakash
2021-11-22 10:30 ` Sagi Grimberg
2021-11-22 10:43 ` Sagi Grimberg
2021-11-22 10:45 ` Sagi Grimberg
2021-11-22 14:34 ` Varun Prakash [this message]
2021-11-22 14:42 ` Sagi Grimberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211122143425.GA1716@chelsio.com \
--to=varun@chelsio.com \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.