]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/hugetlb.c: fix virtual address handling in hugetlb fault
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Thu, 8 Dec 2011 04:41:44 +0000 (15:41 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 13 Dec 2011 06:43:10 +0000 (17:43 +1100)
commit97c37f9c76178fcbd14864d1261e0c51c6f7e42c
tree412e770a41acb2c316736f2ac8ab3b86740a7f7c
parent6d14b17dd33dbdbfa69b9691ba4aada3a1c7730b
mm/hugetlb.c: fix virtual address handling in hugetlb fault

handle_mm_fault() passes 'faulted' address to hugetlb_fault().  This
address is not aligned to a hugepage boundary.

Most of the functions for hugetlb pages are aware of that and calculate an
alignment themselves.  However some functions such as
copy_user_huge_page() and clear_huge_page() don't handle alignment by
themselves.

This patch make hugeltb_fault() fix the alignment and pass an aligned
addresss (to address of a faulted hugepage) to functions.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c