]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nvme: fixes for NVME_IOCTL_IO_CMD on the char device
authorChristoph Hellwig <hch@lst.de>
Thu, 24 Dec 2015 14:27:01 +0000 (15:27 +0100)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 1 Jun 2017 20:40:53 +0000 (13:40 -0700)
commitcfb02283ef6da86d76fa3ace79386bf94189f50c
tree764f6410fa252e49c98db69290ab97d7edb67c07
parent185f0f10a27dec6906699157da505dfe5b90ecc3
nvme: fixes for NVME_IOCTL_IO_CMD on the char device

Make sure we synchronize access to the namespaces list and grab a reference
to the namespace before doing I/O.  Make sure to reject the ioctl if multiple
namespaces are present as it's entirely unsafe, and warn when using it even
with a single namespace.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Acked-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
(cherry picked from commit bfd8947194b2e2a53db82bbc7eb7c15d028c46db)

Orabug: 25130845

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/nvme/host/core.c