]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fm10k: fix PCI device enable_cnt leak in .io_slot_reset
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 9 Jun 2016 19:02:03 +0000 (12:02 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 26 Feb 2017 06:04:29 +0000 (22:04 -0800)
commitb8e0fa37a0a4f189faa0451fbf80d6675a2b4454
tree4bcaabb94fb54c9ff9aabdc68c4d5284fa282397
parentab37f8c8e1dad9761413d8726025e7db6f5624e4
fm10k: fix PCI device enable_cnt leak in .io_slot_reset

A previous patch removed the pci_disable_device() call in
.io_error_detected. This call corresponded to a pci_enable_device_mem()
call within .io_slot_reset handler. Change the call here to
a pci_reenable_device() so that it does not increment and leak the
enable_cnt reference count for the device. Without this change, VF
devices may fail during an unbind/bind, and we'll never zero the
reference counter for the pci_dev structure.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 25394529
(cherry picked from commit e59a393d089d08a4622de07f941dd3629fcaec6a)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
drivers/net/ethernet/intel/fm10k/fm10k_pci.c