diff options
author | Keith Busch <keith.busch@intel.com> | 2016-04-09 01:11:02 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-05-03 23:00:29 +0300 |
commit | 87c32077819c695cbc5ab00226a28010cd5806c3 (patch) | |
tree | ed0c37ce4665c0d5e0232baa2d3023c9bfbee18d /drivers/lightnvm/sysblk.c | |
parent | b7b9c2278752e37dc7ae918cda823aa2a078e03b (diff) | |
download | linux-87c32077819c695cbc5ab00226a28010cd5806c3.tar.xz |
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: ff23a2a15a2117245b4599c1352343c8b8fb4c43]
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>
Diffstat (limited to 'drivers/lightnvm/sysblk.c')
0 files changed, 0 insertions, 0 deletions