]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.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)
committerTim Gardner <tim.gardner@canonical.com>
Mon, 29 Feb 2016 16:00:03 +0000 (09:00 -0700)
commit67e538d7fca05f939b4e8a7032f178dc2e9c5b81
tree23c916c623f54aa9009fe57d22e11d6b417c6e66
parentdc3140caa511c37c27fcf6f0e5d370b19799b5d4
nvme: fixes for NVME_IOCTL_IO_CMD on the char device

BugLink: http://bugs.launchpad.net/bugs/1531539
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)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/nvme/host/core.c