linux/drivers/scsi/mpt3sas
Ranjan Kumar 04631f55af scsi: mpt3sas: Limit NVMe request size to 2 MiB
The HBA firmware reports NVMe MDTS values based on the underlying drive
capability. However, because the driver allocates a fixed 4K buffer for
the PRP list, accommodating at most 512 entries, the driver supports a
maximum I/O transfer size of 2 MiB.

Limit max_hw_sectors to the smaller of the reported MDTS and the 2 MiB
driver limit to prevent issuing oversized I/O that may lead to a kernel
oops.

Cc: stable@vger.kernel.org
Fixes: 9b8b84879d ("block: Increase BLK_DEF_MAX_SECTORS_CAP")
Reported-by: Mira Limbeck <m.limbeck@proxmox.com>
Closes: https://lore.kernel.org/r/291f78bf-4b4a-40dd-867d-053b36c564b3@proxmox.com
Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9b8b84879d4a
Suggested-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com>
Tested-by: Mira Limbeck <m.limbeck@proxmox.com>
Link: https://patch.msgid.link/20260414110811.85156-1-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2026-04-20 22:22:33 -04:00
..
mpi SCSI misc on 20250326 2025-03-26 19:57:34 -07:00
Kconfig scsi: mpt3sas: Fix spelling mistake in Kconfig "compatiblity" -> "compatibility" 2021-01-05 23:25:07 -05:00
Makefile
mpt3sas_base.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
mpt3sas_base.h scsi: mpt3sas: Simplify the workqueue allocation code 2026-01-11 22:03:12 -05:00
mpt3sas_config.c scsi: mpt3sas: Remove unused config functions 2025-02-03 18:00:11 -05:00
mpt3sas_ctl.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
mpt3sas_ctl.h scsi: mpt3sas: Report driver capability as part of IOCINFO command 2025-02-20 21:46:35 -05:00
mpt3sas_debug.h
mpt3sas_debugfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mpt3sas_scsih.c scsi: mpt3sas: Limit NVMe request size to 2 MiB 2026-04-20 22:22:33 -04:00
mpt3sas_transport.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mpt3sas_trigger_diag.c scsi: mpt3sas: Additional diagnostic buffer query interface 2021-02-08 22:02:07 -05:00
mpt3sas_trigger_diag.h scsi: mpt3sas: Fix spelling mistake 2020-06-15 23:28:46 -04:00
mpt3sas_trigger_pages.h scsi: mpt3sas: Fix typo of "TRIGGER" 2023-11-15 08:52:02 -05:00
mpt3sas_warpdrive.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00