From: Donald Dutile Date: Thu, 20 Aug 2009 20:51:34 +0000 (-0400) Subject: intel-iommu: iommu init error path bug fixes X-Git-Tag: v2.6.32-rc1~162^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94a91b5051a77d8a71d4f11a3240f0d9c51b6cf2;p=pandora-kernel.git intel-iommu: iommu init error path bug fixes The kcalloc() failure path in iommu_init_domains() calls free_dmar_iommu(), which assumes that ->domains, ->domain_ids, and ->lock have been properly initialized. Add checks in free_[dmar]_iommu to not use ->domains,->domain_ids if not alloced. Move the lock init to prior to the kcalloc()'s, so it is valid in free_context_table() when free_dmar_iommu() invokes it at the end. Patch based on iommu-2.6, commit 132032274a594ee9ffb6b9c9e2e9698149a09ea9 Signed-off-by: Donald Dutile Signed-off-by: David Woodhouse --- Reading git-diff-tree failed