linux/drivers/nvme/host
Keith Busch e9fc63d682 NVMe: Fix 0-length integrity payload
A user could send a passthrough IO command with a metadata pointer to a
namespace without metadata. With metadata length of 0, kmalloc returns
ZERO_SIZE_PTR. Since that is not NULL, the driver would have set this as
the bio's integrity payload, which causes an access fault on completion.

This patch ignores the users metadata buffer if the namespace format
does not support separate metadata.

Reported-by: Stephen Bates <stephen.bates@microsemi.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
2016-03-03 14:42:50 -07:00
..
core.c NVMe: Fix 0-length integrity payload 2016-03-03 14:42:50 -07:00
Kconfig nvme: fix Kconfig description for BLK_DEV_NVME_SCSI 2016-02-09 10:21:22 -07:00
lightnvm.c lightnvm: check overflow and correct mlc pairs 2016-02-04 09:19:45 -07:00
Makefile Merge branch 'for-4.5/nvme' of git://git.kernel.dk/linux-block 2016-01-21 19:58:02 -08:00
nvme.h NVMe: Move error handling to failed reset handler 2016-03-03 14:42:50 -07:00
pci.c NVMe: Move error handling to failed reset handler 2016-03-03 14:42:50 -07:00
scsi.c nvme: move chardev and sysfs interface to common code 2015-12-01 10:59:40 -07:00