linux/drivers/nvme/host
Chao Leng 9ebbfe495e nvme-tcp: avoid request double completion for concurrent nvme_tcp_timeout
Each name space has a request queue, if complete request long time,
multi request queues may have time out requests at the same time,
nvme_tcp_timeout will execute concurrently. Multi requests in different
request queues may be queued in the same tcp queue, multi
nvme_tcp_timeout may call nvme_tcp_stop_queue at the same time.
The first nvme_tcp_stop_queue will clear NVME_TCP_Q_LIVE and continue
stopping the tcp queue(cancel io_work), but the others check
NVME_TCP_Q_LIVE is already cleared, and then directly complete the
requests, complete request before the io work is completely canceled may
lead to a use-after-free condition.
Add a multex lock to serialize nvme_tcp_stop_queue.

Signed-off-by: Chao Leng <lengchao@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2021-01-18 18:58:18 +01:00
..
core.c nvme: check the PRINFO bit before deciding the host buffer length 2021-01-18 18:58:16 +01:00
fabrics.c nvme-fabrics: reject I/O to offline device 2020-12-01 20:36:37 +01:00
fabrics.h nvme-fabrics: reject I/O to offline device 2020-12-01 20:36:37 +01:00
fault_inject.c nvme: enable to inject errors into admin commands 2019-06-21 11:15:50 +02:00
fc.c nvme-fc: avoid calling _nvme_fc_abort_outstanding_ios from interrupt context 2021-01-06 10:30:36 +01:00
fc.h nvme-fc: Update header and host for common definitions for LS handling 2020-05-09 16:18:33 -06:00
hwmon.c nvme: return errors for hwmon init 2020-09-22 17:49:55 +02:00
Kconfig nvme-tcp: fix kconfig dependency warning when !CRYPTO 2020-09-15 07:58:49 +02:00
lightnvm.c nvme: split nvme_alloc_request() 2020-12-01 20:36:35 +01:00
Makefile nvme: support for zoned namespaces 2020-07-08 16:16:20 +02:00
multipath.c for-5.11/drivers-2020-12-14 2020-12-16 13:09:32 -08:00
nvme.h nvme: remove the unused status argument from nvme_trace_bio_complete 2021-01-06 10:30:37 +01:00
pci.c nvme: avoid possible double fetch in handling CQE 2021-01-06 10:30:37 +01:00
rdma.c nvme-rdma: avoid request double completion for concurrent nvme_rdma_timeout 2021-01-18 18:58:18 +01:00
tcp.c nvme-tcp: avoid request double completion for concurrent nvme_tcp_timeout 2021-01-18 18:58:18 +01: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
zns.c nvme: export zoned namespaces without Zone Append support read-only 2020-12-01 20:36:38 +01:00