If you look at do_mmap in mm/mmap.c you can see that your parameters
cause an overflow:
[...]
/* offset overflow? */
if (off + len < off)
return -EINVAL;
[...]
And it wouldn't even help you to change the size argument since the size
gets aligned to a page-size (0x1000) first:
[...]
if ((len = PAGE_ALIGN(len)) == 0)
return addr;
[...]
Maybe you try to change the expression above to:
if (off + len - 1 < off)
return -EINVAL;
Christian
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/