linux_dsm_epyc7002/arch/parisc
Helge Deller 0576da2c08 parisc: fix mmap(MAP_FIXED|MAP_SHARED) to already mmapped address
locale-gen on Debian showed a strange problem on parisc:
mmap2(NULL, 536870912, PROT_NONE, MAP_SHARED, 3, 0) = 0x42a54000
mmap2(0x42a54000, 103860, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, 3, 0) = -1 EINVAL (Invalid argument)

Basically it was just trying to re-mmap() a file at the same address
which it was given by a previous mmap() call. But this remapping failed
with EINVAL.

The problem is, that when MAP_FIXED and MAP_SHARED flags were used, we didn't
included the mapping-based offset when we verified the alignment of the given
fixed address against the offset which we calculated it in the previous call.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: <stable@vger.kernel.org> # 3.10+
2013-11-30 20:57:50 +01:00
..
configs parisc: add generic 32- and 64-bit defconfigs 2013-11-07 23:07:22 +01:00
hpux [readdir] constify ->actor 2013-06-29 12:57:05 +04:00
include parisc: break out SOCK_NONBLOCK define to own asm header file 2013-11-19 23:36:17 +01:00
kernel parisc: fix mmap(MAP_FIXED|MAP_SHARED) to already mmapped address 2013-11-30 20:57:50 +01:00
lib parisc: size_t is unsigned, so comparison size < 0 doesn't make sense. 2013-11-20 00:09:42 +01:00
math-emu parisc: remove duplicate define 2013-11-07 22:28:15 +01:00
mm parisc: improve SIGBUS/SIGSEGV error reporting 2013-11-19 23:36:18 +01:00
oprofile oprofile: more whitespace fixes 2008-10-15 20:55:51 +02:00
defpalo.conf parisc: switch to gzip-compressed vmlinuz kernel 2013-07-09 22:09:20 +02:00
install.sh parisc: make "make install" not depend on vmlinux 2013-11-07 22:28:06 +01:00
Kconfig Kconfig cleanups for v3.13 2013-11-15 14:05:15 -08:00
Kconfig.debug consolidate per-arch stack overflow debugging options 2013-07-04 11:25:39 -07:00
Makefile parisc: make "make install" not depend on vmlinux 2013-11-07 22:28:06 +01:00
nm Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00