if (security_vm_enough_memory((newbrk-oldbrk) >> PAGE_SHIFT)) { 
if (do_brk(oldbrk, newbrk-oldbrk) != oldbrk) { 
asmlinkage int irix_brk(unsigned long brk){	unsigned long rlim;	unsigned long newbrk, oldbrk;	struct mm_struct *mm = current->mm;	int ret;	down_write(&mm->mmap_sem);	if (brk < mm->end_code) {		ret = -ENOMEM;		goto out;	}	newbrk = PAGE_ALIGN(brk);	oldbrk = PAGE_ALIGN(mm->brk);	if (oldbrk == newbrk) {		mm->brk = brk;		ret = 0;		goto out;	}	/*	 * Always allow shrinking brk	 */	if (brk <= mm->brk) {		mm->brk = brk;		do_munmap(mm, newbrk, oldbrk-newbrk);		ret = 0;		goto out;	}	/*	 * Check against rlimit and stack..	 */	rlim = current->signal->rlim[RLIMIT_DATA].rlim_cur;	if (rlim >= RLIM_INFINITY)		rlim = ~0;	if (brk - mm->end_code > rlim) {		ret = -ENOMEM;		goto out;	}	/*	 * Check against existing mmap mappings.	 */	if (find_vma_intersection(mm, oldbrk, newbrk+PAGE_SIZE)) {		ret = -ENOMEM;		goto out;	}	/*	 * Check if we have enough memory..	 */	if (security_vm_enough_memory((newbrk-oldbrk) >> PAGE_SHIFT)) {		ret = -ENOMEM;		goto out;	}	/*	 * Ok, looks good - let it rip.	 */	mm->brk = brk;	do_brk(oldbrk, newbrk-oldbrk);	ret = 0;out:	up_write(&mm->mmap_sem);	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/2fd4ef85e0db9ed75c98e13953257a967ea55e03/sysirix.c/clean/arch/mips/kernel/sysirix.c