 /* * A zero mmap always succeeds in Linux, independent of whether or not the * remaining arguments are valid. */ if (len == 0) goto out; 
do_mmap2 (unsigned long addr, unsigned long len, int prot, int flags, int fd, unsigned long pgoff){	unsigned long roff;	struct file *file = NULL;	flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);	if (!(flags & MAP_ANONYMOUS)) {		file = fget(fd);		if (!file)			return -EBADF;		if (!file->f_op || !file->f_op->mmap) {			addr = -ENODEV;			goto out;		}	}	/*	 * A zero mmap always succeeds in Linux, independent of whether or not the	 * remaining arguments are valid.	 */	if (len == 0)		goto out;	/* Careful about overflows.. */	len = PAGE_ALIGN(len);	if (!len || len > TASK_SIZE) {		addr = -EINVAL;		goto out;	}	/*	 * Don't permit mappings into unmapped space, the virtual page table of a region,	 * or across a region boundary.  Note: RGN_MAP_LIMIT is equal to 2^n-PAGE_SIZE	 * (for some integer n <= 61) and len > 0.	 */	roff = REGION_OFFSET(addr);	if ((len > RGN_MAP_LIMIT) || (roff > (RGN_MAP_LIMIT - len))) {		addr = -EINVAL;		goto out;	}	down_write(&current->mm->mmap_sem);	addr = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);	up_write(&current->mm->mmap_sem);out:	if (file)		fput(file);	return addr;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d11cf326bd5e785cc5a3f5a3d3f4e3a5522f4fb7/sys_ia64.c/buggy/arch/ia64/kernel/sys_ia64.c