2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-29 07:34:06 +08:00
linux-next/drivers/nvme/host
Keith Busch 9bf2b972af NVMe: Fix reset/remove race
This fixes a scenario where device is present and being reset, but a
request to unbind the driver occurs.

A previous patch series addressing a device failure removal scenario
flushed reset_work after controller disable to unblock reset_work waiting
on a completion that wouldn't occur. This isn't safe as-is. The broken
scenario can potentially be induced with:

  modprobe nvme && modprobe -r nvme

To fix, the reset work is flushed immediately after setting the controller
removing flag, and any subsequent reset will not proceed with controller
initialization if the flag is set.

The controller status must be polled while active, so the watchdog timer
is also left active until the controller is disabled to cleanup requests
that may be stuck during namespace removal.

[Fixes: ff23a2a15a]
Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
2016-04-11 10:00:04 -06:00
..
core.c Merge branch 'for-4.6/drivers' of git://git.kernel.dk/linux-block 2016-03-18 17:13:31 -07:00
Kconfig Merge branch 'for-4.6/drivers' of git://git.kernel.dk/linux-block 2016-03-18 17:13:31 -07:00
lightnvm.c nvme: lightnvm: return ppa completion status 2016-03-18 18:10:38 -07:00
Makefile nvme: split pci module out of core module 2016-02-10 14:22:38 -07:00
nvme.h Merge branch 'for-4.6/drivers' of git://git.kernel.dk/linux-block 2016-03-18 17:13:31 -07:00
pci.c NVMe: Fix reset/remove race 2016-04-11 10:00:04 -06:00
scsi.c nvme: move chardev and sysfs interface to common code 2015-12-01 10:59:40 -07:00