aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2014-02-21 16:13:44 -0500
committerMatthew Wilcox <matthew.r.wilcox@intel.com>2014-03-24 08:45:57 -0400
commit5a92e700af2e5e0e6404988d6a7f2ed3dad3f46f (patch)
tree0de62a3873a05bb0e21fc5195be6ff20af5366cf /include/linux
parentfb35e914b3f88cda9ee6f9d776910c35269c4ecf (diff)
NVMe: RCU protected access to io queues
This adds rcu protected access to nvme_queue to fix a race between a surprise removal freeing the queue and a thread with open reference on a NVMe block device using that queue. The queues do not need to be rcu protected during the initialization or shutdown parts, so I've added a helper function for raw deferencing to get around the sparse errors. There is still a hole in the IOCTL path for the same problem, which is fixed in a subsequent patch. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nvme.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index 69ae03f6eb15..98d367b06f9c 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -73,7 +73,7 @@ enum {
73 */ 73 */
74struct nvme_dev { 74struct nvme_dev {
75 struct list_head node; 75 struct list_head node;
76 struct nvme_queue **queues; 76 struct nvme_queue __rcu **queues;
77 u32 __iomem *dbs; 77 u32 __iomem *dbs;
78 struct pci_dev *pci_dev; 78 struct pci_dev *pci_dev;
79 struct dma_pool *prp_page_pool; 79 struct dma_pool *prp_page_pool;