提交 5ca8b91d 编写于 作者: J John David Anglin 提交者: Helge Deller

parisc: ensure that mmapped shared pages are aligned at SHMLBA addresses

Signed-off-by: NJohn David Anglin <dave.anglin@bell.net>
Signed-off-by: NHelge Deller <deller@gmx.de>
上级 027f27c4
...@@ -94,11 +94,12 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, ...@@ -94,11 +94,12 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
{ {
if (len > TASK_SIZE) if (len > TASK_SIZE)
return -ENOMEM; return -ENOMEM;
/* Might want to check for cache aliasing issues for MAP_FIXED case if (flags & MAP_FIXED) {
* like ARM or MIPS ??? --BenH. if ((flags & MAP_SHARED) &&
*/ (addr - (pgoff << PAGE_SHIFT)) & (SHMLBA - 1))
if (flags & MAP_FIXED) return -EINVAL;
return addr; return addr;
}
if (!addr) if (!addr)
addr = TASK_UNMAPPED_BASE; addr = TASK_UNMAPPED_BASE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册