X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=kernel%2Fexit.c;fp=kernel%2Fexit.c;h=9b652d8628da5a9899c38d7a6091a0c96a8f060f;hb=a8e794ca871505c8ea96cc102f4ad555c5231d7f;hp=96d7394ccb262768bc486b6522fe926e2461667b;hpb=b76fcd5f0c655b6e3e9bf534594357025421c66a;p=linux-2.6.git diff --git a/kernel/exit.c b/kernel/exit.c index 96d7394cc..9b652d862 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -35,6 +35,11 @@ int getrusage(struct task_struct *, int, struct rusage *); static void __unhash_process(struct task_struct *p) { nr_threads--; + /* tasklist_lock is held, is this sufficient? */ + if (p->vx_info) { + atomic_dec(&p->vx_info->cacct.nr_threads); + atomic_dec(&p->vx_info->limit.res[RLIMIT_NPROC]); + } detach_pid(p, PIDTYPE_PID); detach_pid(p, PIDTYPE_TGID); if (thread_group_leader(p)) { @@ -234,6 +239,7 @@ void reparent_to_init(void) ptrace_unlink(current); /* Reparent to init */ REMOVE_LINKS(current); + /* FIXME handle vchild_reaper/initpid */ current->parent = child_reaper; current->real_parent = child_reaper; SET_LINKS(current); @@ -378,6 +384,7 @@ static inline void close_files(struct files_struct * files) struct file * file = xchg(&files->fd[i], NULL); if (file) filp_close(file, files); + vx_openfd_dec(fd); } i++; set >>= 1; @@ -597,6 +604,7 @@ static inline void forget_original_parent(struct task_struct * father) struct task_struct *p, *reaper = father; struct list_head *_p, *_n; + /* FIXME handle vchild_reaper/initpid */ reaper = father->group_leader; if (reaper == father) reaper = child_reaper;