From: Christoph Hellwig <hch@lst.de>
To: Eugene Korenevsky <ekorenevsky@aliyun.com>
Cc: Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] nvme: nvme_identify_ns_descs: prevent oob
Date: Wed, 3 Dec 2025 07:10:46 +0100 [thread overview]
Message-ID: <20251203061046.GA16562@lst.de> (raw)
In-Reply-To: <aS8uVVBz_n4lI3bM@localhost.localdomain>
On Tue, Dec 02, 2025 at 09:22:13PM +0300, Eugene Korenevsky wrote:
> @@ -1563,11 +1564,14 @@ static int nvme_identify_ns_descs(struct nvme_ctrl *ctrl,
> goto free_data;
> }
>
> - for (pos = 0; pos < NVME_IDENTIFY_DATA_SIZE; pos += len) {
> - struct nvme_ns_id_desc *cur = data + pos;
> + for (pos = 0; pos < NVME_IDENTIFY_DATA_SIZE - sizeof(*cur); pos += len) {
Please avoid the overly long line.
Otherwise this looks fine.
next prev parent reply other threads:[~2025-12-03 6:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 18:22 [PATCH v4] nvme: nvme_identify_ns_descs: prevent oob Eugene Korenevsky
2025-12-03 6:10 ` Christoph Hellwig [this message]
2025-12-04 16:09 ` Keith Busch
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=20251203061046.GA16562@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=ekorenevsky@aliyun.com \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox