parisc: ensure that mmapped shared pages are aligned at SHMLBA addresses
Signed-off-by: John David Anglin <dave.anglin@bell.net> Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
027f27c4ec
commit
5ca8b91df8
1 changed files with 5 additions and 4 deletions
|
@ -94,11 +94,12 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
|
|||
{
|
||||
if (len > TASK_SIZE)
|
||||
return -ENOMEM;
|
||||
/* Might want to check for cache aliasing issues for MAP_FIXED case
|
||||
* like ARM or MIPS ??? --BenH.
|
||||
*/
|
||||
if (flags & MAP_FIXED)
|
||||
if (flags & MAP_FIXED) {
|
||||
if ((flags & MAP_SHARED) &&
|
||||
(addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1))
|
||||
return -EINVAL;
|
||||
return addr;
|
||||
}
|
||||
if (!addr)
|
||||
addr = TASK_UNMAPPED_BASE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue