|
@@ -45,7 +45,8 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
|
|
/* We do not accept a shared mapping if it would violate
|
|
/* We do not accept a shared mapping if it would violate
|
|
* cache aliasing constraints.
|
|
* cache aliasing constraints.
|
|
*/
|
|
*/
|
|
- if ((flags & MAP_SHARED) && (addr & (SHMLBA - 1)))
|
|
|
|
|
|
+ if ((flags & MAP_SHARED) &&
|
|
|
|
+ ((addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1)))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
return addr;
|
|
return addr;
|
|
}
|
|
}
|