[PATCH] nvmet: bound zone append to BIO_MAX_VECS segments
Nilay Shroff
nilay at linux.ibm.com
Wed Dec 2 06:11:01 PST 2026
On 12/1/26 2:04 PM, Guixin Liu wrote:
> nvmet_bdev_execute_zone_append() builds a single bio with req->sg_cnt
> entries. A fabric host can submit a zone append whose data length
> exceeds BIO_MAX_VECS pages, and bio_alloc() then hits the BUG() in
> biovec_slab(), killing the target. Unlike the read/write path, zone
> append cannot be split into multiple bios.
>
> The ZASL advertised to the host is derived from the backend device
> limit without accounting for this, so even a host that respects the
> advertised limit can trigger the BUG.
>
> Cap the advertised ZASL at BIO_MAX_VECS pages, mirroring the passthru
> mdts cap, and reject commands with more segments than a single bio
> can hold with Invalid Field.
>
> Fixes: aaf2e048af27 ("nvmet: add ZBD over ZNS backend support")
> Cc:stable at vger.kernel.org
> Signed-off-by: Guixin Liu<kanie at linux.alibaba.com>
Looks good to me:
Reviewed-by: Nilay Shroff <nilay at linux.ibm.com>
More information about the Linux-nvme
mailing list