linux/drivers/nvme/host
Sagi Grimberg 59c7c3caaa nvme: fix possible hang when ns scanning fails during error recovery
When the controller is reconnecting, the host fails I/O and admin
commands as the host cannot reach the controller. ns scanning may
revalidate namespaces during that period and it is wrong to remove
namespaces due to these failures as we may hang (see 205da24343).

One command that may fail is nvme_identify_ns_descs. Since we return
success due to having ns identify descriptor list optional, we continue
to compare ns identifiers in nvme_revalidate_disk, obviously fail and
return -ENODEV to nvme_validate_ns, which will remove the namespace.

Exactly what we don't want to happen.

Fixes: 22802bf742 ("nvme: Namepace identification descriptor list is optional")
Tested-by: Anton Eidelman <anton@lightbitslabs.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2020-05-09 16:07:58 -06:00
..
Kconfig nvme: Don't deter users from enabling hwmon support 2020-03-26 04:45:25 +09:00
Makefile nvme: Add hardware monitoring support 2019-11-12 01:57:35 +09:00
core.c nvme: fix possible hang when ns scanning fails during error recovery 2020-05-09 16:07:58 -06:00
fabrics.c nvme-fabrics: Use scnprintf() for avoiding potential buffer overflow 2020-03-26 04:51:55 +09:00
fabrics.h nvme: Remove ADMIN_ONLY state 2019-10-14 23:21:44 +09:00
fault_inject.c nvme: enable to inject errors into admin commands 2019-06-21 11:15:50 +02:00
fc.c nvme-fc: Revert "add module to ops template to allow module references" 2020-04-04 09:09:39 +02:00
hwmon.c nvme: hwmon: switch to use <linux/units.h> helpers 2020-01-31 10:30:40 -08:00
lightnvm.c lightnvm: move metadata mapping to lower level driver 2019-08-06 08:20:10 -06:00
multipath.c nvme: fix deadlock caused by ANA update wrong locking 2020-04-04 09:07:03 +02:00
nvme.h nvme: Fix controller creation races with teardown flow 2020-03-26 04:51:56 +09:00
pci.c nvme-pci: fix "slimmer CQ head update" 2020-05-09 16:07:58 -06:00
rdma.c block-5.7-2020-04-10 2020-04-10 10:06:54 -07:00
tcp.c nvme-tcp: fix possible crash in recv error flow 2020-04-01 11:07:13 +02:00
trace.c nvme: trace: parse Get LBA Status command in detail 2019-08-29 12:55:01 -07:00
trace.h nvme-trace: print result and status in hex format 2019-06-21 11:12:37 +02:00