android_kernel_motorola_sm6375/drivers/pci
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Feilong Lin bbd7ba95bb ACPI / hotplug / PCI: Fix reference count leak in enable_slot()
[ Upstream commit 3bbfd319034ddce59e023837a4aa11439460509b ]

In enable_slot(), if pci_get_slot() returns NULL, we clear the SLOT_ENABLED
flag. When pci_get_slot() finds a device, it increments the device's
reference count.  In this case, we did not call pci_dev_put() to decrement
the reference count, so the memory of the device (struct pci_dev type) will
eventually leak.

Call pci_dev_put() to decrement its reference count when pci_get_slot()
returns a PCI device.

Link: https://lore.kernel.org/r/b411af88-5049-a1c6-83ac-d104a1f429be@huawei.com
Signed-off-by: Feilong Lin <linfeilong@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-22 11:38:28 +02:00
..
controller PCI: thunder: Fix compile testing 2021-05-22 11:38:28 +02:00
endpoint PCI: endpoint: Fix missing destroy_workqueue() 2021-05-19 10:08:25 +02:00
hotplug ACPI / hotplug / PCI: Fix reference count leak in enable_slot() 2021-05-22 11:38:28 +02:00
pcie PCI/ASPM: Add missing newline in sysfs 'policy' 2020-08-19 08:16:13 +02:00
switch
access.c
ats.c
bus.c PCI: Add device even if driver attach failed 2020-08-21 13:05:20 +02:00
ecam.c
host-bridge.c
iov.c PCI/IOV: Mark VFs as not implementing PCI_COMMAND_MEMORY 2020-10-29 09:57:54 +01:00
irq.c
Kconfig
Makefile
mmap.c
msi.c
of.c
p2pdma.c
pci-acpi.c PM: ACPI: PCI: Drop acpi_pm_set_bridge_wakeup() 2020-12-30 11:51:32 +01:00
pci-bridge-emul.c
pci-bridge-emul.h
pci-driver.c
pci-label.c
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c
pci.c PCI: PM: Do not read power state in pci_enable_device_flags() 2021-05-11 14:04:06 +02:00
pci.h PCI: thunder: Fix compile testing 2021-05-22 11:38:28 +02:00
probe.c PCI: Release OF node in pci_scan_device()'s error path 2021-05-19 10:08:25 +02:00
proc.c
quirks.c PCI: Add function 1 DMA alias quirk for Marvell 9215 SATA controller 2021-03-11 14:06:50 +01:00
remove.c
rom.c PCI: Use ioremap(), not phys_to_virt() for platform ROM 2020-10-01 13:17:51 +02:00
search.c
setup-bus.c PCI: Avoid double hpmemsize MMIO window assignment 2020-10-01 13:17:19 +02:00
setup-irq.c
setup-res.c PCI: Decline to resize resources if boot config must be preserved 2021-03-04 10:26:10 +01:00
slot.c PCI: Fix pci_slot_release() NULL pointer dereference 2020-12-30 11:51:47 +01:00
syscall.c PCI: Align checking of syscall user config accessors 2021-03-04 10:26:36 +01:00
vc.c
vpd.c PCI: Allow VPD access for QLogic ISP2722 2021-05-14 09:44:12 +02:00
xen-pcifront.c