[PATCH] nvme: validate maxcmd before use it

Christoph Hellwig hch at lst.de
Sun Dec 17 21:56:28 PST 2023


On Fri, Dec 15, 2023 at 04:43:28PM +0800, Guixin Liu wrote:
> According to the NVMe specification, if the 'maximum outstanding
> commands' (maxcmd) field is not utilized, it must be set to 0h.
> When a host connects to a target that does not employ the maxcmd
> field, the queue size (sqsize) gets set to an excessively large
> value due to the calculation (u16)(0 - 1) = 65535.
> As a result, such a misconfiguration leads to the failure of the
> connection establishment.

MAXCMD is mandatory for Fabrics.




More information about the Linux-nvme mailing list