linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PPC64] Hugepage bugfix
@ 2005-01-10 15:55 David Gibson
  2005-01-10  5:04 ` William Lee Irwin III
  0 siblings, 1 reply; 2+ messages in thread
From: David Gibson @ 2005-01-10 15:55 UTC (permalink / raw)
  To: Andrew Morton, Linus Torvalds; +Cc: linuxppc64-dev, linux-kernel

Andrew, Linus, please apply:

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>

Index: working-2.6/arch/ppc64/mm/hugetlbpage.c
===================================================================
--- working-2.6.orig/arch/ppc64/mm/hugetlbpage.c	2005-01-06 10:47:48.000000000 +1100
+++ working-2.6/arch/ppc64/mm/hugetlbpage.c	2005-01-10 15:16:25.142319552 +1100
@@ -745,7 +745,7 @@
 
 	pgdir = mm->context.huge_pgdir;
 	if (! pgdir)
-		return;
+		goto out;
 
 	mm->context.huge_pgdir = NULL;
 
@@ -768,6 +768,7 @@
 	BUG_ON(memcmp(pgdir, empty_zero_page, PAGE_SIZE));
 	kmem_cache_free(zero_cache, pgdir);
 
+ out:
 	spin_unlock(&mm->page_table_lock);
 }
 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist.  NOT _the_ _other_ _way_
				| _around_!
http://www.ozlabs.org/people/dgibson

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-01-10  5:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-10 15:55 [PPC64] Hugepage bugfix David Gibson
2005-01-10  5:04 ` William Lee Irwin III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).