PCI/AER: Take reference on error devices
authorKeith Busch <keith.busch@intel.com>
Thu, 20 Sep 2018 16:27:09 +0000 (10:27 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Nov 2019 17:47:12 +0000 (18:47 +0100)
commitf3f55d83ea0d7fa5dddfb5a51f3eb92345919da3
tree9b9d438a59dff3f970ea19f27b92ba3a27b1ed09
parent40ebd8b31feaf0e78991656eb7659e115fb902dd
PCI/AER: Take reference on error devices

[ Upstream commit 60271ab044a53edb9dcbe76bebea2221c4ff04d9 ]

Error handling may be running in parallel with a hot removal.  Reference
count the device during AER handling so the device can not be freed while
AER wants to reference it.

Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Sinan Kaya <okaya@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/pcie/aer.c