]> git.baikalelectronics.ru Git - kernel.git/commit
NVMe: RCU protected access to io queues
authorKeith Busch <keith.busch@intel.com>
Fri, 21 Feb 2014 21:13:44 +0000 (14:13 -0700)
committerMatthew Wilcox <matthew.r.wilcox@intel.com>
Mon, 24 Mar 2014 12:45:57 +0000 (08:45 -0400)
commitc1dee4a360c45c2072b9a099361a2f1d94feb785
tree0de62a3873a05bb0e21fc5195be6ff20af5366cf
parent11e0802ae80b4975df3818c2956e7e4f6b11c875
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>
drivers/block/nvme-core.c
include/linux/nvme.h