From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 14 Nov 2006 15:48:13 -0800 From: Bill Irwin Subject: Re: [hugepage] Fix unmap_and_free_vma backout path Message-ID: <20061114234813.GP7919@holomorphy.com> References: <000301c706f6$4ae26160$a081030a@amr.corp.intel.com> <1163450069.17046.24.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org Return-Path: To: Hugh Dickins Cc: Adam Litke , "Chen, Kenneth W" , 'David Gibson' , 'Christoph Lameter' , 'Andrew Morton' , bill.irwin@oracle.com, linux-mm@kvack.org List-ID: On Mon, Nov 13, 2006 at 08:41:49PM +0000, Hugh Dickins wrote: > [PATCH] hugetlb: prepare_hugepage_range check offset too > prepare_hugepage_range should check file offset alignment when it checks > virtual address and length, to stop MAP_FIXED with a bad huge offset from > unmapping before it fails further down. PowerPC should apply the same > prepare_hugepage_range alignment checks as ia64 and all the others do. > Then none of the alignment checks in hugetlbfs_file_mmap are required > (nor is the check for too small a mapping); but even so, move up setting > of VM_HUGETLB and add a comment to warn of what David Gibson discovered - > if hugetlbfs_file_mmap fails before setting it, do_mmap_pgoff's unmap_region > when unwinding from error will go the non-huge way, which may cause bad > behaviour on architectures (powerpc and ia64) which segregate their huge > mappings into a separate region of the address space. > Signed-off-by: Hugh Dickins Acked-by: William Irwin -- wli -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org