From: Adam Litke Date: Wed, 12 Nov 2008 21:24:56 +0000 (-0800) Subject: hugetlb: make unmap_ref_private multi-size-aware X-Git-Tag: v2.6.27.7~34 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fc576fc6c06dc972f5bb0a78bb76e81e9860d2b;p=pandora-kernel.git hugetlb: make unmap_ref_private multi-size-aware commit 7526674de0c921e7f1e9b6f71a1f9d832557b554 upstream. Oops. Part of the hugetlb private reservation code was not fully converted to use hstates. When a huge page must be unmapped from VMAs due to a failed COW, HPAGE_SIZE is used in the call to unmap_hugepage_range() regardless of the page size being used. This works if the VMA is using the default huge page size. Otherwise we might unmap too much, too little, or trigger a BUG_ON. Rare but serious -- fix it. Signed-off-by: Adam Litke Cc: Jon Tollefson Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed