[PATCH v2 1/1] nvme: fix FDP configuration log parsing

Christoph Hellwig hch at lst.de
Wed May 27 06:32:05 PDT 2026


On Wed, May 27, 2026 at 10:29:45AM +0800, liuxixin wrote:
> 	<cover.1779848573.git.gliuxen at gmail.com>
> From: liuxixin <gliuxen at gmail.com>
> Date: Wed, 27 May 2026 10:22:32 +0800
> Subject: [PATCH v2 1/1] nvme: fix FDP configuration log parsing
> 
> The fdpcidx bounds check sets n = NUMFDPC + 1 but used > instead of >=,
> incorrectly accepting fdp_idx when it equals n (i.e. NUMFDPC + 1).

Looks good.

> 
> Also validate descriptor sizes while walking the list so dsze == 0 or a
> descriptor past the log end cannot cause unbounded iteration or reads past
> the buffer.

Also looks good, although I would have split that into a separate
patch.

> Fixes: 30b5f20bb2ddab013035399e5c7e6577da49320a ("nvme: register fdp parameters with the block layer")

Please shorten the sha id to 12 characters, i.e:

Fixes: 30b5f20bb2dd ("nvme: register fdp parameters with the block layer")




More information about the Linux-nvme mailing list