From: Greg KH Date: Thu, 21 Aug 2008 20:47:58 +0000 (-0700) Subject: PCI: fix reference leak in pci_get_dev_by_id() X-Git-Tag: v2.6.27-rc5~36^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebca4f1bce1eb7b91a63c515db66316db9391221;p=pandora-kernel.git PCI: fix reference leak in pci_get_dev_by_id() Alex Chiang and Matthew Wilcox pointed out that pci_get_dev_by_id() does not properly decrement the reference on the from pointer if it is present, like the documentation for the function states it will. It fixes a pretty bad leak in the hotplug core (we were leaking an entire struct pci_dev for each function of each offlined card, the first time around; subsequent onlines/offlines were ok). Cc: Matthew Wilcox Cc: stable Tested-by: Alex Chiang Acked-by: Alex Chiang Signed-off-by: Greg Kroah-Hartman Signed-off-by: Jesse Barnes --- Reading git-diff-tree failed