diff options
author | Xianting Tian <tian.xianting@h3c.com> | 2020-09-22 14:25:17 +0800 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-09-22 17:49:55 +0200 |
commit | 50b7c24390a53c78de546215282fb52980f1d7b7 (patch) | |
tree | 55b34dabf43b8f26584984f7259a6874e33992a5 /drivers/nvme/host/fc.c | |
parent | 59e330f8ff7ada7aa64fa422f6adf22a45152a7e (diff) | |
download | linux-50b7c24390a53c78de546215282fb52980f1d7b7.tar.bz2 |
nvme-pci: fix NULL req in completion handler
Currently, we use nvmeq->q_depth as the upper limit for a valid tag in
nvme_handle_cqe(), it is not correct. Because the available tag number
is recorded in tagset, which is not equal to nvmeq->q_depth.
The nvme driver registers interrupts for queues before initializing the
tagset, because it uses the number of successful request_irq() calls to
configure the tagset parameters. This allows a race condition with the
current tag validity check if the controller happens to produce an
interrupt with a corrupted CQE before the tagset is initialized.
Replace the driver's indirect tag check with the one already provided by
the block layer.
Signed-off-by: Xianting Tian <tian.xianting@h3c.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host/fc.c')
0 files changed, 0 insertions, 0 deletions