]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer
authorSteve Siwinski <ssiwinski@atto.com>
Thu, 8 May 2025 20:01:22 +0000 (16:01 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 May 2025 12:10:06 +0000 (14:10 +0200)
commitd5b4310993947b0c561d4d648ca96cd464c58f57
treef0bc5ae558f693603a8277fbc54b6b0be64920b3
parent4861b3d2a4789f7c25ad08a8cc517256f3da15ee
scsi: sd_zbc: block: Respect bio vector limits for REPORT ZONES buffer

commit e8007fad5457ea547ca63bb011fdb03213571c7e upstream.

The REPORT ZONES buffer size is currently limited by the HBA's maximum
segment count to ensure the buffer can be mapped. However, the block
layer further limits the number of iovec entries to 1024 when allocating
a bio.

To avoid allocation of buffers too large to be mapped, further restrict
the maximum buffer size to BIO_MAX_INLINE_VECS.

Replace the UIO_MAXIOV symbolic name with the more contextually
appropriate BIO_MAX_INLINE_VECS.

Fixes: b091ac616846 ("sd_zbc: Fix report zones buffer allocation")
Cc: stable@vger.kernel.org
Signed-off-by: Steve Siwinski <ssiwinski@atto.com>
Link: https://lore.kernel.org/r/20250508200122.243129-1-ssiwinski@atto.com
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/bio.c
drivers/scsi/sd_zbc.c
include/linux/bio.h