]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
nvme-pci: initialize queue memory before interrupts
authorKeith Busch <keith.busch@intel.com>
Thu, 14 Sep 2017 17:54:39 +0000 (13:54 -0400)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Sep 2017 14:56:05 +0000 (08:56 -0600)
commit161b8be2bd6abad250d4b3f674bdd5480f15beeb
tree92f9980a7c62acd14e6e549d90e6c236c792bef6
parentdeb61742e060d4447712598bc11bb50f8b2e51dd
nvme-pci: initialize queue memory before interrupts

A spurious interrupt before the nvme driver has initialized the completion
queue may inadvertently cause the driver to believe it has a completion
to process. This may result in a NULL dereference since the nvmeq's tags
are not set at this point.

The patch initializes the host's CQ memory so that a spurious interrupt
isn't mistaken for a real completion.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/pci.c