2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-19 10:44:14 +08:00
linux-next/arch
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
..
alpha alpha: -Werror fixes for sys_titan.c 2007-08-11 15:47:42 -07:00
arm [ARM] 4561/1: i.MX/MX1 GPIO parenthes omission and input setup fix 2007-08-30 10:14:25 +01:00
avr32 [AVR32] Wire up i2c-gpio on the ATNGW100 board 2007-08-15 16:36:55 +02:00
blackfin Blackfin arch: after removing fs.h from mm.h, fix the broken on Blackfin arch 2007-08-11 15:47:39 -07:00
cris ide: fix hidden dependencies on CONFIG_IDE_GENERIC 2007-08-20 22:42:54 +02:00
frv FRV: connect up fallocate 2007-08-11 15:47:40 -07:00
h8300 h8300: missing include 2007-08-22 19:52:44 -07:00
i386 hugepage: fix broken check for offset alignment in hugepage mappings 2007-08-31 01:42:23 -07:00
ia64 hugepage: fix broken check for offset alignment in hugepage mappings 2007-08-31 01:42:23 -07:00
m32r m32r: build fix for removing fs.h from mm.h 2007-07-30 10:52:10 -07:00
m68k m68k: Dont include RODATA into text segment 2007-08-22 19:52:45 -07:00
m68knommu m68knommu: include linux/fs.h for do_pipe() 2007-08-23 21:32:54 -07:00
mips spi: correct name for spi_txx9 2007-08-31 01:42:22 -07:00
parisc [PARISC] Add NOTES section 2007-08-27 00:29:25 -04:00
powerpc [POWERPC] PS3: Fix bug where the major version part is not compared 2007-08-30 20:49:41 +10:00
ppc [POWERPC] Fix small race in 44x tlbie function 2007-08-15 15:12:50 +10:00
s390 [S390] kprobes: fix instruction length calculation 2007-08-22 13:51:49 +02:00
sh sh: missing symbol fix for sh4-202 2007-08-22 13:32:07 +09:00
sh64 sh64: arch/sh64/kernel/setup.c: duplicate include removal. 2007-08-12 12:18:54 +09:00
sparc [SPARC32]: Kill unused vars and macros from prom/console.c 2007-08-26 18:49:10 -07:00
sparc64 hugepage: fix broken check for offset alignment in hugepage mappings 2007-08-31 01:42:23 -07:00
um uml: fix x86_64 core dump crash 2007-08-31 01:42:22 -07:00
v850 PTRACE_POKEDATA consolidation 2007-07-17 10:23:03 -07:00
x86_64 PM: Fix dependencies of CONFIG_SUSPEND and CONFIG_HIBERNATION 2007-08-31 01:42:22 -07:00
xtensa xtensa process.c must #include <linux/fs.h> 2007-08-30 09:58:22 -07:00