mm->hiwater_rss = get_mm_counter(mm,rss); 
mm->hiwater_rss = get_mm_rss(mm); 
static int copy_mm(unsigned long clone_flags, struct task_struct * tsk){	struct mm_struct * mm, *oldmm;	int retval;	tsk->min_flt = tsk->maj_flt = 0;	tsk->nvcsw = tsk->nivcsw = 0;	tsk->mm = NULL;	tsk->active_mm = NULL;	/*	 * Are we cloning a kernel thread?	 *	 * We need to steal a active VM for that..	 */	oldmm = current->mm;	if (!oldmm)		return 0;	if (clone_flags & CLONE_VM) {		atomic_inc(&oldmm->mm_users);		mm = oldmm;		/*		 * There are cases where the PTL is held to ensure no		 * new threads start up in user mode using an mm, which		 * allows optimizing out ipis; the tlb_gather_mmu code		 * is an example.		 */		spin_unlock_wait(&oldmm->page_table_lock);		goto good_mm;	}	retval = -ENOMEM;	mm = allocate_mm();	if (!mm)		goto fail_nomem;	/* Copy the current MM stuff.. */	memcpy(mm, oldmm, sizeof(*mm));	if (!mm_init(mm))		goto fail_nomem;	if (init_new_context(tsk,mm))		goto fail_nocontext;	retval = dup_mmap(mm, oldmm);	if (retval)		goto free_pt;	mm->hiwater_rss = get_mm_counter(mm,rss);	mm->hiwater_vm = mm->total_vm;good_mm:	tsk->mm = mm;	tsk->active_mm = mm;	return 0;free_pt:	mmput(mm);fail_nomem:	return retval;fail_nocontext:	/*	 * If init_new_context() failed, we cannot use mmput() to free the mm	 * because it calls destroy_context()	 */	mm_free_pgd(mm);	free_mm(mm);	return retval;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/4294621f41a85497019fae64341aa5351a1921b7/fork.c/buggy/kernel/fork.c