linux-yocto/drivers/pci
Qiushi Wu d3d12858d4 PCI: Fix pci_create_slot() reference count leak
[ Upstream commit 8a94644b44 ]

kobject_init_and_add() takes a reference even when it fails.  If it returns
an error, kobject_put() must be called to clean up the memory associated
with the object.

When kobject_init_and_add() fails, call kobject_put() instead of kfree().

b8eb718348 ("net-sysfs: Fix reference count leak in
rx|netdev_queue_add_kobject") fixed a similar problem.

Link: https://lore.kernel.org/r/20200528021322.1984-1-wu000273@umn.edu
Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-09-03 11:22:26 +02:00
..
dwc PCI: keystone: Fix link training retries initiation 2020-02-14 16:32:11 -05:00
endpoint PCI: endpoint: Fix for concurrent memory allocation in OB address region 2020-04-24 08:00:37 +02:00
host irqdomain/treewide: Free firmware node after domain removal 2020-08-21 09:48:16 +02:00
hotplug PCI: hotplug: ACPI: Fix context refcounting in acpiphp_grab_context() 2020-08-21 09:48:17 +02:00
pcie PCI/ASPM: Add missing newline in sysfs 'policy' 2020-08-21 09:48:10 +02:00
switch PCI/switchtec: Fix init_completion race condition with poll_wait() 2020-04-24 08:00:27 +02:00
access.c PCI: Fix pci_cfg_wait queue locking problem 2020-08-21 09:48:09 +02:00
ats.c
bus.c
ecam.c
host-bridge.c
hotplug-pci.c
htirq.c
iov.c PCI/IOV: Fix memory leak in pci_iov_add_virtfn() 2020-02-28 16:35:59 +01:00
irq.c
Kconfig
Makefile
mmap.c
msi.c PCI/MSI: Fix incorrect MSI-X masking on resume 2019-12-21 10:47:41 +01:00
of.c
pci-acpi.c PCI / ACPI: Enable wake automatically for power managed bridges 2018-11-13 11:14:58 -08:00
pci-driver.c PCI/PM: Always return devices to D0 when thawing 2019-12-21 10:47:40 +01:00
pci-label.c
pci-mid.c x86/cpu: Sanitize FAM6_ATOM naming 2019-05-14 19:18:42 +02:00
pci-stub.c
pci-sysfs.c PCI: sysfs: Ignore lockdep for remove attribute 2019-07-31 07:28:52 +02:00
pci.c PCI: PM: Fix pci_power_up() 2019-10-29 09:17:45 +01:00
pci.h
probe.c PCI: Fix pci_register_host_bridge() device_register() error handling 2020-06-25 15:41:52 +02:00
proc.c
quirks.c PCI: Release IVRS table in AMD ACS quirk 2020-08-21 09:48:11 +02:00
remove.c PCI/ASPM: Fix link_state teardown on device removal 2018-11-13 11:15:07 -08:00
rom.c
search.c
setup-bus.c PCI: Don't disable bridge BARs when assigning bus resources 2020-02-14 16:32:21 -05:00
setup-irq.c
setup-res.c
slot.c PCI: Fix pci_create_slot() reference count leak 2020-09-03 11:22:26 +02:00
syscall.c
vc.c
vpd.c
xen-pcifront.c