diff options
Diffstat (limited to 'arch/mips/kernel/syscall.c')
| -rw-r--r-- | arch/mips/kernel/syscall.c | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c index c25b2e7dcb7..3f7f466190b 100644 --- a/arch/mips/kernel/syscall.c +++ b/arch/mips/kernel/syscall.c @@ -93,7 +93,8 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,  		 * We do not accept a shared mapping if it would violate  		 * cache aliasing constraints.  		 */ -		if ((flags & MAP_SHARED) && (addr & shm_align_mask)) +		if ((flags & MAP_SHARED) && +		    ((addr - (pgoff << PAGE_SHIFT)) & shm_align_mask))  			return -EINVAL;  		return addr;  	}  |