linux/drivers/nvme/target
Logan Gunthorpe df06047d54 nvmet: limit passthru MTDS by BIO_MAX_PAGES
nvmet_passthru_map_sg() only supports mapping a single BIO, not a chain
so the effective maximum transfer should also be limitted by
BIO_MAX_PAGES (presently this works out to 1MB).

For PCI passthru devices the max_sectors would typically be more
limitting than BIO_MAX_PAGES, but this may not be true for all passthru
devices.

Fixes: c1fef73f79 ("nvmet: add passthru code to process commands")
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2020-10-22 15:27:57 +02:00
..
admin-cmd.c nvmet: handle keep-alive timer when kato is modified by a set features cmd 2020-09-27 09:14:19 +02:00
configfs.c nvmet: fix a memory leak 2020-08-21 17:14:27 -06:00
core.c nvmet: fix uninitialized work for zero kato 2020-10-22 15:27:14 +02:00
discovery.c nvmet: introduce flags member in nvmet_fabrics_ops 2020-07-08 16:16:17 +02:00
fabrics-cmd.c nvmet: add metadata/T10-PI support 2020-05-27 07:12:40 +02:00
fc.c nvmet-fc: fix missing check for no hostport struct 2020-09-27 09:14:19 +02:00
fcloop.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
io-cmd-bdev.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
io-cmd-file.c nvmet: rename nvmet_check_data_len to nvmet_check_transfer_len 2020-05-27 07:12:39 +02:00
Kconfig nvmet: introduce the passthru Kconfig option 2020-07-29 07:45:21 +02:00
loop.c nvme-loop: don't put ctrl on nvme_init_ctrl error 2020-10-07 07:56:16 +02:00
Makefile nvmet: add passthru code to process commands 2020-07-29 07:45:21 +02:00
nvmet.h nvmet: handle keep-alive timer when kato is modified by a set features cmd 2020-09-27 09:14:19 +02:00
passthru.c nvmet: limit passthru MTDS by BIO_MAX_PAGES 2020-10-22 15:27:57 +02:00
rdma.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
tcp.c nvmet-tcp: have queue io_work context run on sock incoming cpu 2020-09-27 09:14:18 +02:00
trace.c nvmet: trace: parse Get LBA Status command in detail 2019-08-29 12:55:01 -07:00
trace.h nvmet: add async event tracing support 2020-05-27 07:12:38 +02:00