]> git.karo-electronics.de Git - karo-tx-linux.git/commit
sparc64: Fix memory leak in pci_register_iommu_region().
authorDavid S. Miller <davem@davemloft.net>
Sun, 11 Apr 2010 03:26:55 +0000 (20:26 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 12 May 2010 22:03:05 +0000 (15:03 -0700)
commit70935714dcaf540b6b10328270948a0cda85ab18
tree607c4d6b8cf99b65c396dfd527e1d8894239769c
parent28a1bdd6c2e46a94d86929d5283b72808ee147e9
sparc64: Fix memory leak in pci_register_iommu_region().

[ Upstream commit e182c77cc291456eed127b1472952ddb59a81a9d ]

Found by kmemleak.

If request_resource() fails, we leak the struct resource we
allocated to represent the IOMMU mapping area.

This actually happens on sun4v machines because the IOMEM area is only
reported sans the IOMMU region, unlike all previous systems.  I'll
need to fix that at some point, but for now fix the leak.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/sparc/kernel/pci_common.c