The patch titled pci: hotplug/cpcihp, fix pci device refcounting has been added to the -mm tree. Its filename is pci-hotplug-cpcihp-fix-pci-device-refcounting.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: pci: hotplug/cpcihp, fix pci device refcounting From: Jiri Slaby <jslaby@xxxxxxx> Stanse found an ommitted pci_dev_put on one error path in cpcihp_generic_init. The path is taken on !dev, but also when dev->hdr_type != PCI_HEADER_TYPE_BRIDGE. However it omits to pci_dev_put on the latter. As it is fine to pass NULL to pci_dev_put, put it in there uncoditionally. Signed-off-by: Jiri Slaby <jslaby@xxxxxxx> Cc: Scott Murray <scott@xxxxxxxxxxxx> Cc: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/pci/hotplug/cpcihp_generic.c | 1 + 1 file changed, 1 insertion(+) diff -puN drivers/pci/hotplug/cpcihp_generic.c~pci-hotplug-cpcihp-fix-pci-device-refcounting drivers/pci/hotplug/cpcihp_generic.c --- a/drivers/pci/hotplug/cpcihp_generic.c~pci-hotplug-cpcihp-fix-pci-device-refcounting +++ a/drivers/pci/hotplug/cpcihp_generic.c @@ -162,6 +162,7 @@ static int __init cpcihp_generic_init(vo dev = pci_get_slot(bus, PCI_DEVFN(bridge_slot, 0)); if(!dev || dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) { err("Invalid bridge device %s", bridge); + pci_dev_put(dev); return -EINVAL; } bus = dev->subordinate; _ Patches currently in -mm which might be from jslaby@xxxxxxx are origin.patch linux-next.patch gpu-drm-i915-fix-potential-null-dereference.patch infiniband-use-rlimit-helpers.patch mtd-chips-cfi-remove-unneeded-null-checks.patch pci-hotplug-cpcihp-fix-pci-device-refcounting.patch mm-use-rlimit-helpers.patch fs-use-rlimit-helpers.patch ipc-use-rlimit-helpers.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html