]> git.baikalelectronics.ru Git - kernel.git/commit
ARM/PCI: Fix pcibios_init_resource() struct pci_host_bridge leak
authorLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Mon, 10 Jul 2017 12:34:08 +0000 (13:34 +0100)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 10 Jul 2017 14:33:14 +0000 (09:33 -0500)
commitefb807b0662af2b3451fee7907c99ab494c8481e
tree0ee4a920955bfdf490b3b1ac920b2b66c9db753e
parent85a737d8dc147e4a6e79c78fa6ca9ad40aa6a47c
ARM/PCI: Fix pcibios_init_resource() struct pci_host_bridge leak

Since commit 0ebab252ac63 ("ARM/PCI: Convert PCI scan API to
pci_scan_root_bus_bridge()") the space for struct pci_sys_data is allocated
by pci_alloc_host_bridge() as part of the struct pci_host_bridge.

Therefore, failure paths must deallocate the entire pci_host_bridge by
using pci_free_host_bridge().

Fixes: 0ebab252ac63 ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()")
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
[bhelgaas: changelog]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Andrew Lunn <andrew@lunn.ch>
arch/arm/kernel/bios32.c