Hugh Dickins 856fc29505 [PATCH] hugetlb: fix prio_tree unit
hugetlb_vmtruncate_list was misconverted to prio_tree: its prio_tree is in
units of PAGE_SIZE (PAGE_CACHE_SIZE) like any other, not HPAGE_SIZE (whereas
its radix_tree is kept in units of HPAGE_SIZE, otherwise slots would be
absurdly sparse).

At first I thought the error benign, just calling __unmap_hugepage_range on
more vmas than necessary; but on 32-bit machines, when the prio_tree is
searched correctly, it happens to ensure the v_offset calculation won't
overflow.  As it stood, when truncating at or beyond 4GB, it was liable to
discard pages COWed from lower offsets; or even to clear pmd entries of
preceding vmas, triggering exit_mmap's BUG_ON(nr_ptes).

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Adam Litke <agl@us.ibm.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-28 11:30:53 -07:00
..
2006-10-11 11:14:23 -07:00
2006-10-10 16:15:33 -07:00
2006-10-15 11:00:58 -07:00
2006-10-03 23:28:36 +02:00
2006-10-20 09:13:10 -04:00
2006-10-11 11:14:21 -07:00
2006-10-11 11:14:21 -07:00
2006-10-10 16:15:34 -07:00
2006-10-11 11:14:23 -07:00
2006-10-13 12:42:36 -05:00
2006-10-11 11:14:23 -07:00
2006-10-21 13:35:06 -07:00
2006-10-20 10:26:43 -07:00
2006-10-03 23:01:26 +02:00
2006-10-11 11:14:23 -07:00
2006-10-05 16:18:55 -07:00
2006-10-10 16:15:34 -07:00
2006-10-04 06:51:26 -06:00
2006-10-11 11:14:25 -07:00
2006-10-11 11:14:21 -07:00
2006-10-02 07:57:15 -07:00
2006-04-11 13:53:33 +02:00
2006-10-01 00:39:33 -07:00
2006-06-26 09:58:17 -07:00
2006-10-01 00:39:19 -07:00
2006-03-23 07:38:11 -08:00
2006-10-01 00:39:29 -07:00
2006-03-23 07:38:12 -08:00
2006-10-01 00:39:19 -07:00
2006-10-09 14:20:38 -07:00