kernel-fxtec-pro1x/drivers/pci
Qiushi Wu 03f4e517e6 PCI: Fix pci_create_slot() reference count leak
[ Upstream commit 8a94644b440eef5a7b9c104ac8aa7a7f413e35e5 ]

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().

b8eb718348b8 ("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:24:20 +02:00
..
controller PCI: qcom: Add support for tx term offset for rev 2.1.0 2020-08-21 11:05:29 +02:00
endpoint
hotplug PCI: hotplug: ACPI: Fix context refcounting in acpiphp_grab_context() 2020-08-21 11:05:29 +02:00
pcie PCI/ASPM: Add missing newline in sysfs 'policy' 2020-08-19 08:14:58 +02:00
switch
access.c PCI: Fix pci_cfg_wait queue locking problem 2020-08-19 08:14:56 +02:00
ats.c
bus.c PCI: Add device even if driver attach failed 2020-08-21 11:05:29 +02:00
ecam.c
host-bridge.c
iov.c
irq.c
Kconfig
Makefile
mmap.c
msi.c
of.c
pci-acpi.c
pci-driver.c
pci-label.c
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c
pci.c
pci.h
probe.c PCI: Probe bridge window attributes once at enumeration-time 2020-08-21 11:05:29 +02:00
proc.c
quirks.c PCI: Mark AMD Navi10 GPU rev 0x00 ATS as broken 2020-08-21 11:05:29 +02:00
remove.c
rom.c
search.c
setup-bus.c PCI: Probe bridge window attributes once at enumeration-time 2020-08-21 11:05:29 +02:00
setup-irq.c
setup-res.c PCI: Allow pci_resize_resource() for devices on root bus 2020-06-25 15:32:48 +02:00
slot.c PCI: Fix pci_create_slot() reference count leak 2020-09-03 11:24:20 +02:00
syscall.c
vc.c
vpd.c
xen-pcifront.c