Commit 3025e382 authored by David Gibson's avatar David Gibson Committed by Linus Torvalds

[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: default avatarDavid Gibson <dwg@au1.ibm.com>
Acked-by: default avatarWilliam Irwin <wli@holomorphy.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 11d78290
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment