From: Bob Liu Date: Wed, 25 May 2011 00:12:56 +0000 (-0700) Subject: nommu: add page alignment to mmap X-Git-Tag: v3.0-rc1~214 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f67d9b1576c1c6e02100f8b27f4e9d66bbeb4d49;p=pandora-kernel.git nommu: add page alignment to mmap Currently on nommu arch mmap(),mremap() and munmap() doesn't do page_align() which isn't consist with mmu arch and cause some issues. First, some drivers' mmap() function depends on vma->vm_end - vma->start is page aligned which is true on mmu arch but not on nommu. eg: uvc camera driver. Second munmap() may return -EINVAL[split file] error in cases when end is not page aligned(passed into from userspace) but vma->vm_end is aligned dure to split or driver's mmap() ops. Add page alignment to fix those issues. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Bob Liu Cc: David Howells Cc: Paul Mundt Cc: Greg Ungerer Cc: Geert Uytterhoeven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed