> ] unsigned long do_mmap(struct file * file, unsigned long addr, unsigned long len,
> ] unsigned long prot, unsigned long flags, unsigned long off)
> ] {
> ] struct mm_struct * mm = current->mm;
> ] struct vm_area_struct * vma;
> ] int error;
> ]
> ] if ((len = PAGE_ALIGN(len)) == 0)
> ] return addr;
>
> And "here" is where this happens.
>
> Wouldn't it be better to just do "return NULL"?
Dunno if this is POSIX or not, but in this case (len <= 0) Solaris returns
MAP_FAILED and sets errno to EINVAL.
-
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/