]> 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>
Wed, 30 Nov 2011 04:11:27 +0000 (15:11 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 30 Nov 2011 04:13:48 +0000 (15:13 +1100)
commit4ca96382fd14589714e2cb7f36373a6cc1232010
tree8bbd47feccdb4b01ef0bf8112dfe012bf3974666
parent4e94dae5b3bddf91227a38c2b75b158f3746a3c3
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