Files
linux/arch/parisc/kernel
Helge Deller ca62ebe3b1 parisc: fix mmap(MAP_FIXED|MAP_SHARED) to already mmapped address
commit 0576da2c08 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-11 22:36:27 -08:00
..
2013-05-24 23:29:01 +02:00
2012-05-07 11:38:46 +02:00
2012-12-14 13:06:43 +10:30
2013-05-05 00:10:41 -04:00
2013-01-15 22:30:15 -08:00
2010-10-16 22:43:08 +02:00
2013-04-08 17:39:27 +02:00