]> git.itanic.dy.fi Git - linux-stable/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Jun 2018 07:52:32 +0000 (09:52 +0200)
commitb53761a18e71a5ce699c1e93d0f9a7c59b186f08
tree510a09e9ae8a738756d6c378293a5eccddc2ecbd
parentae0c8eeb66045ea2e327b23d21788622ca510627
nvme-pci: initialize queue memory before interrupts

commit 161b8be2bd6abad250d4b3f674bdd5480f15beeb upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvme/host/pci.c