[net-next,02/11] ixgbe: Fix device ref count bug

Submitted by Jeff Kirsher on Feb. 1, 2013, 7:53 a.m.


Message ID 1359705211-11342-3-git-send-email-jeffrey.t.kirsher@intel.com
State Accepted
Delegated to: David Miller
Headers show

Commit Message

Jeff Kirsher Feb. 1, 2013, 7:53 a.m.
From: Greg Rose <gregory.v.rose@intel.com>

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 | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 5989b3f..1f53675 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);