aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2005-01-09 15:46:04 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-09 15:46:04 -0800
commit3025e38282f760375d7a55645dcd020548a1338d (patch)
tree21352dc387aa2f9c3ab94668c31bd8bb714fcffe /arch
parent11d7829025bddd70d592061728e62e0419de0349 (diff)
downloadhistory-3025e38282f760375d7a55645dcd020548a1338d.tar.gz
[PATCH] ppc64: hugepage bugfix
Fix a stupid unbalanced lock bug in the ppc64 hugepage code. Lead rapidly to a crash if both CONFIG_HUGETLB_PAGE and CONFIG_PREEMPT were enabled (even without actually using hugepages at all). Signed-off-by: David Gibson <dwg@au1.ibm.com> Acked-by: William Irwin <wli@holomorphy.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/ppc64/mm/hugetlbpage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/ppc64/mm/hugetlbpage.c b/arch/ppc64/mm/hugetlbpage.c
index 7b6b074a461d6c..12b3def68f3dc6 100644
--- a/arch/ppc64/mm/hugetlbpage.c
+++ b/arch/ppc64/mm/hugetlbpage.c
@@ -745,7 +745,7 @@ void hugetlb_mm_free_pgd(struct mm_struct *mm)
pgdir = mm->context.huge_pgdir;
if (! pgdir)
- return;
+ goto out;
mm->context.huge_pgdir = NULL;
@@ -768,6 +768,7 @@ void hugetlb_mm_free_pgd(struct mm_struct *mm)
BUG_ON(memcmp(pgdir, empty_zero_page, PAGE_SIZE));
kmem_cache_free(zero_cache, pgdir);
+ out:
spin_unlock(&mm->page_table_lock);
}