提交 05d84681 编写于 作者: M Michael Ellerman 提交者: Paul Mackerras

[PATCH] powerpc: Fix mmap returning 64 bit addresses

The merge of syscalls.c & sys_ppc32.c (30286ef6)
broke mmap, if the mmap returned a 64 bit address.

do_mmap2 was taking the return value from do_mmap_pgoff (an unsigned long), and
storing it in an int, before returning it to sys_mmap as an unsigned long. So
we were losing the high bits of the address.

You would have thought the compiler could catch this for us ...
Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 90eac727
......@@ -162,7 +162,7 @@ static inline unsigned long do_mmap2(unsigned long addr, size_t len,
unsigned long fd, unsigned long off, int shift)
{
struct file * file = NULL;
int ret = -EINVAL;
unsigned long ret = -EINVAL;
if (shift) {
if (off & ((1 << shift) - 1))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册