patch-2.1.52 linux/kernel/exit.c

Next file: linux/kernel/fork.c
Previous file: linux/include/linux/smb_mount.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.51/linux/kernel/exit.c linux/kernel/exit.c
@@ -446,13 +446,7 @@
 		tsk->mm = &init_mm;
 		tsk->swappable = 0;
 		SET_PAGE_DIR(tsk, swapper_pg_dir);
-
-		/* free the old state - not used any more */
-		if (!--mm->count) {
-			exit_mmap(mm);
-			free_page_tables(mm);
-			kmem_cache_free(mm_cachep, mm);
-		}
+		mmput(mm);
 	}
 }
 
@@ -504,7 +498,8 @@
 
 		p->p_pptr = p->p_opptr;
 		p->p_osptr = p->p_pptr->p_cptr;
-		p->p_osptr->p_ysptr = p;
+		if (p->p_osptr)
+			p->p_osptr->p_ysptr = p;
 		p->p_pptr->p_cptr = p;
 		if (p->state == TASK_ZOMBIE)
 			notify_parent(p, p->exit_signal);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov