ixgbe: Fix device ref count bug
authorGreg Rose <gregory.v.rose@intel.com>
Thu, 13 Dec 2012 01:14:06 +0000 (01:14 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 1 Feb 2013 05:35:33 +0000 (21:35 -0800)
The device lookup neglected to do a pci_dev_put() to decrement the
device reference count.

Reported-by: Elena Gurevich <elena.gurevich@toganetworks.com>
Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index 5989b3fa9fdc7432a8a00f4fa58e148935799e74..1f53675a1d6ace5c1676381623bc2958a0c7d517 100644 (file)
@@ -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);