nvme/pci: Hold controller reference during async probe
authorKeith Busch <keith.busch@intel.com>
Mon, 7 May 2018 14:30:24 +0000 (08:30 -0600)
committerKeith Busch <keith.busch@intel.com>
Mon, 7 May 2018 14:30:24 +0000 (08:30 -0600)
commit80f513b5056d0bf127653d2327b7b24e322dc7e3
treef1e68c4104d1e77433a3a596b431ea9efdd4effe
parent3831761eb859f5599a522f064007b31100510c3a
nvme/pci: Hold controller reference during async probe

It is possible the driver's remove may have freed the controller if
the remove callback is invoked prior to the async_schedule starting
the reset_work. This patch fixes that by holding a reference on the
controller.

Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
drivers/nvme/host/pci.c