David Gibson
dec4ad86c2
hugepage: fix broken check for offset alignment in hugepage mappings
...
For hugepage mappings, the file offset, like the address and size, needs to
be aligned to the size of a hugepage.
In commit 68589bc353 , the check for this was
moved into prepare_hugepage_range() along with the address and size checks.
But since BenH's rework of the get_unmapped_area() paths leading up to
commit 4b1d89290b , prepare_hugepage_range()
is only called for MAP_FIXED mappings, not for other mappings. This means
we're no longer ever checking for an aligned offset - I've confirmed that
mmap() will (apparently) succeed with a misaligned offset on both powerpc
and i386 at least.
This patch restores the check, removing it from prepare_hugepage_range()
and putting it back into hugetlbfs_file_mmap(). I'm putting it there,
rather than in the get_unmapped_area() path so it only needs to go in one
place, than separately in the half-dozen or so arch-specific
implementations of hugetlb_get_unmapped_area().
Signed-off-by: David Gibson <david@gibson.dropbear.id.au >
Cc: Adam Litke <agl@us.ibm.com >
Cc: Andi Kleen <ak@suse.de >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2007-08-31 01:42:23 -07:00
..
2007-07-30 16:26:27 -03:00
2007-07-17 10:23:07 -07:00
2007-07-12 15:41:24 -07:00
2007-07-26 01:53:39 +02:00
2007-08-04 21:18:16 -07:00
2007-07-18 02:21:50 -07:00
2007-07-10 22:16:55 -07:00
2007-07-19 10:04:52 -07:00
2007-07-24 09:28:11 +02:00
2007-07-17 10:23:09 -07:00
2007-07-31 15:39:44 -07:00
2007-07-19 15:21:39 -04:00
2007-07-12 16:29:50 -07:00
2007-07-23 13:56:16 -04:00
2007-07-11 16:02:08 -07:00
2007-07-19 10:04:43 -07:00
2007-07-25 12:02:21 -07:00
2007-07-20 08:44:19 -07:00
2007-07-20 01:11:59 +02:00
2007-07-16 09:05:42 -07:00
2007-08-23 21:37:45 -07:00
2007-07-16 09:05:52 -07:00
2007-07-16 01:20:23 +01:00
2007-07-19 10:04:45 -07:00
2007-08-11 22:34:49 +02:00
2007-07-27 08:08:24 +02:00
2007-08-11 22:34:48 +02:00
2007-06-01 08:18:27 -07:00
2007-07-31 10:43:05 -05:00
2007-07-19 19:50:50 +10:00
2007-07-16 09:05:51 -07:00
2007-07-16 09:05:42 -07:00
2007-07-16 09:05:48 -07:00
2007-08-11 15:47:42 -07:00
2007-07-20 11:22:30 -07:00
2007-07-21 17:49:14 -07:00
2007-07-21 17:49:14 -07:00
2007-07-21 18:37:08 -07:00
2007-07-26 11:11:57 -07:00
2007-07-10 17:18:59 -07:00
2007-06-08 17:23:34 -07:00
2007-07-16 09:05:42 -07:00
2007-07-16 09:05:46 -07:00
2007-08-31 01:42:22 -07:00
2007-07-17 10:23:04 -07:00
2007-07-11 20:58:54 +08:00
2007-07-20 21:42:24 +02:00
2007-07-11 16:09:00 -07:00
2007-07-26 12:13:06 -07:00
2007-07-09 08:22:54 +01:00
2007-07-09 08:22:33 +01:00
2007-07-09 08:23:17 +01:00
2007-07-16 09:05:45 -07:00
2007-07-13 08:06:13 -07:00
2007-07-11 16:09:00 -07:00
2007-07-16 09:05:42 -07:00
2007-07-19 10:04:54 -07:00
2007-07-12 10:55:56 -07:00
2007-07-08 22:16:36 -04:00
2007-07-17 10:23:06 -07:00
2007-07-24 09:28:11 +02:00
2007-07-20 21:42:24 +02:00
2007-07-18 08:47:40 -07:00
2007-06-01 08:18:29 -07:00
2007-07-10 22:16:21 -07:00
2007-07-31 14:00:29 -07:00
2007-06-28 11:34:53 -07:00
2007-07-17 10:23:06 -07:00
2007-07-16 09:05:52 -07:00
2007-07-16 09:05:52 -07:00
2007-07-18 09:02:56 -04:00
2007-07-18 09:15:20 -04:00
2007-07-18 09:15:20 -04:00
2007-07-18 09:19:57 -04:00
2007-07-17 21:42:44 -04:00
2007-07-17 10:23:13 -07:00
2007-07-16 09:05:45 -07:00
2007-07-10 00:07:45 +02:00
2007-07-29 16:45:38 -07:00
2007-08-11 22:34:47 +02:00
2007-07-18 18:29:37 -04:00
2007-07-16 09:05:41 -07:00
2007-06-18 09:48:41 -07:00
2007-07-18 15:47:52 -07:00
2007-07-30 00:27:28 -07:00
2007-07-17 10:22:59 -07:00
2007-07-09 08:23:12 +01:00
2007-07-10 00:35:17 -04:00
2007-07-09 18:51:58 +02:00
2007-07-09 14:23:37 +02:00
2007-07-19 10:04:41 -07:00
2007-07-16 09:05:45 -07:00
2007-08-31 01:42:23 -07:00
2007-07-20 11:11:16 +02:00
2007-07-31 15:39:41 -07:00
2007-07-20 10:11:58 +09:00
2007-08-20 22:42:56 +02:00
2007-07-16 09:05:34 -07:00
2007-07-12 16:07:26 -04:00
2007-07-10 22:15:03 -07:00
2007-07-14 18:55:06 -07:00
2007-07-10 22:15:58 -07:00
2007-08-26 18:35:42 -07:00
2007-07-10 22:15:58 -07:00
2007-07-10 22:16:42 -07:00
2007-07-14 18:53:28 -07:00
2007-06-22 17:04:27 -07:00
2007-07-16 09:05:47 -07:00
2007-08-11 15:58:13 -07:00
2007-08-23 23:05:55 -04:00
2007-07-28 19:42:22 -07:00
2007-07-16 09:05:50 -07:00
2007-07-20 10:06:38 +02:00
2007-07-16 09:05:47 -07:00
2007-07-31 02:28:17 -07:00
2007-07-21 19:07:33 -07:00
2007-07-31 15:39:41 -07:00
2007-07-18 08:57:06 -04:00
2007-07-17 10:23:03 -07:00
2007-08-22 19:52:45 -07:00
2007-08-26 18:35:34 -07:00
2007-07-31 15:39:40 -07:00
2007-08-11 15:47:41 -07:00
2007-07-17 10:23:05 -07:00
2007-07-18 08:47:40 -07:00
2007-07-30 14:25:12 -07:00
2007-07-19 10:04:44 -07:00
2007-07-10 22:15:26 -07:00
2007-07-16 01:20:23 +01:00
2007-07-22 11:22:01 -07:00
2007-07-26 11:35:17 -07:00
2007-07-26 11:35:17 -07:00
2007-07-28 19:54:33 -07:00
2007-07-24 16:55:01 -04:00
2007-07-17 10:23:03 -07:00
2007-07-17 10:23:13 -07:00
2007-07-19 10:04:49 -07:00
2007-07-24 12:24:59 -07:00
2007-07-16 09:05:34 -07:00
2007-07-16 12:05:49 +03:00
2007-07-18 08:47:45 -07:00
2007-08-22 19:52:47 -07:00
2007-08-22 19:52:45 -07:00
2007-08-22 19:52:47 -07:00
2007-07-16 09:05:48 -07:00
2007-08-17 15:16:37 -07:00
2007-07-16 09:05:42 -07:00
2007-07-16 09:05:42 -07:00
2007-07-24 21:16:02 +00:00
2007-07-19 10:04:45 -07:00
2007-07-16 09:05:51 -07:00
2007-08-13 22:52:14 -07:00
2007-07-10 22:18:21 -07:00
2007-07-18 15:47:05 -07:00
2007-07-10 23:40:48 -04:00
2007-07-10 23:40:25 -04:00
2007-07-10 23:40:39 -04:00
2007-08-07 15:13:17 -04:00
2007-07-10 23:40:48 -04:00
2007-07-10 23:40:26 -04:00
2007-07-19 15:21:39 -04:00
2007-07-31 02:28:15 -07:00
2007-07-16 09:05:48 -07:00
2007-07-20 13:41:56 +10:00
2007-07-22 21:30:59 +10:00
2007-07-20 13:10:22 +10:00
2007-07-20 21:42:24 +02:00
2007-07-19 10:04:52 -07:00
2007-07-09 12:17:34 -04:00
2007-08-31 01:42:23 -07:00
2007-08-22 14:48:41 -07:00
2007-07-10 11:25:59 +01:00
2007-07-16 09:05:41 -07:00
2007-07-16 09:05:42 -07:00
2007-07-16 09:05:48 -07:00
2007-07-10 08:04:16 +02:00
2007-07-11 19:46:26 -07:00
2007-07-10 22:16:22 -07:00
2007-07-30 12:25:49 -07:00
2007-08-25 16:58:27 +10:00
2007-07-26 11:35:21 -07:00
2007-07-26 11:35:21 -07:00
2007-07-10 11:25:44 +01:00
2007-07-16 09:05:50 -07:00
2007-07-26 13:40:43 +02:00
2007-07-16 09:05:46 -07:00
2007-08-11 15:47:40 -07:00
2007-07-17 10:23:03 -07:00
2007-08-11 15:47:41 -07:00
2007-07-18 08:47:40 -07:00
2007-07-28 19:42:22 -07:00
2007-07-21 18:37:10 -07:00
2007-06-07 13:39:34 -07:00
2007-08-30 22:10:28 -07:00
2007-08-25 18:41:53 +02:00
2007-07-12 10:55:54 -07:00
2007-07-16 09:05:42 -07:00
2007-07-16 09:05:50 -07:00
2007-08-22 19:52:45 -07:00
2007-08-22 19:52:47 -07:00
2007-07-10 17:51:13 -07:00
2007-07-24 12:24:58 -07:00
2007-07-24 12:24:58 -07:00
2007-08-22 19:52:44 -07:00
2007-07-16 09:05:35 -07:00
2007-07-18 00:37:01 -04:00
2007-07-22 11:03:37 -07:00
2007-07-31 02:28:28 -07:00
2007-07-17 10:23:01 -07:00
2007-07-20 12:33:44 -07:00
2007-07-17 17:26:43 -07:00
2007-08-31 01:09:21 -07:00
2007-06-24 08:59:11 -07:00
2007-07-16 09:05:42 -07:00
2007-07-17 14:39:19 -07:00
2007-07-16 09:05:45 -07:00
2007-07-16 09:05:46 -07:00
2007-07-19 10:04:49 -07:00
2007-07-19 10:04:49 -07:00
2007-07-16 09:05:40 -07:00
2007-07-10 08:04:14 +02:00
2007-07-19 10:04:49 -07:00
2007-07-18 08:47:40 -07:00
2007-07-29 16:45:38 -07:00
2007-07-17 10:22:59 -07:00
2007-07-20 21:42:15 +02:00
2007-07-31 15:39:39 -07:00
2007-07-11 16:09:06 -07:00
2007-07-11 16:09:09 -07:00
2007-07-16 09:05:46 -07:00
2007-07-25 10:17:44 -07:00
2007-07-16 09:05:45 -07:00
2007-07-20 11:23:02 -07:00
2007-08-02 17:41:40 +02:00
2007-08-11 15:47:41 -07:00
2007-07-10 22:15:57 -07:00
2007-07-18 15:57:15 -07:00
2007-07-16 09:05:45 -07:00
2007-07-12 16:34:42 -07:00
2007-07-30 13:27:44 -07:00
2007-07-19 14:05:08 -07:00
2007-07-16 09:05:48 -07:00
2007-08-20 12:18:01 -03:00
2007-07-21 18:37:14 -07:00
2007-07-17 10:22:59 -07:00
2007-07-17 10:23:11 -07:00
2007-07-09 18:52:01 +02:00
2007-07-16 09:05:51 -07:00