summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSteve Siwinski <ssiwinski@atto.com>2025-05-08 23:01:22 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-22 15:12:22 +0300
commitc682a193447a0f2743b3192a9dfe1272dcc98f31 (patch)
tree79bd06811e507dc529176efa165e0448e68e593f /include
parenta1546ec7e049888db0cb708345313fee7e6971a8 (diff)
downloadlinux-c682a193447a0f2743b3192a9dfe1272dcc98f31.tar.xz
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/bio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 0286bada25ce..b893418c3cc0 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -11,6 +11,7 @@
#include <linux/uio.h>
#define BIO_MAX_VECS 256U
+#define BIO_MAX_INLINE_VECS UIO_MAXIOV
struct queue_limits;