From: Greg Rose Date: Thu, 13 Dec 2012 01:14:06 +0000 (+0000) Subject: ixgbe: Fix device ref count bug X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b4fafbe97f9548f49b9338537c25a3db451b8508;p=openwrt%2Fstaging%2Fblogic.git ixgbe: Fix device ref count bug The device lookup neglected to do a pci_dev_put() to decrement the device reference count. Reported-by: Elena Gurevich Signed-off-by: Greg Rose Tested-by: Phil Schmitt Tested-by: Sibai Li Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 5989b3fa9fdc..1f53675a1d6a 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -7758,6 +7758,8 @@ static pci_ers_result_t ixgbe_io_error_detected(struct pci_dev *pdev, if (vfdev) { e_dev_err("Issuing VFLR to VF %d\n", vf); pci_write_config_dword(vfdev, 0xA8, 0x00008000); + /* Free device reference count */ + pci_dev_put(vfdev); } pci_cleanup_aer_uncorrect_error_status(pdev);