diff options
| author | Jeff Garzik <jeff@garzik.org> | 2006-04-12 16:54:16 -0400 | 
|---|---|---|
| committer | Jeff Garzik <jeff@garzik.org> | 2006-04-12 16:54:16 -0400 | 
| commit | 875999c5539999f61a45620aae0c3e5fb1d2b035 (patch) | |
| tree | 4535032a8a10f5782c0aef6a620b1a624ea9f863 /kernel/exit.c | |
| parent | 79072f38909e3d9883317238887460c39ddcc4cb (diff) | |
| parent | 26ec634c31a11a003040e10b4d650495158632fd (diff) | |
Merge branch 'upstream'
Diffstat (limited to 'kernel/exit.c')
| -rw-r--r-- | kernel/exit.c | 11 | 
1 files changed, 10 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index bc0ec674d3f4..1a9787ac6173 100644 --- a/kernel/exit.c +++ b/kernel/exit.c  | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #include <linux/mutex.h> | 34 | #include <linux/mutex.h> | 
| 35 | #include <linux/futex.h> | 35 | #include <linux/futex.h> | 
| 36 | #include <linux/compat.h> | 36 | #include <linux/compat.h> | 
| 37 | #include <linux/pipe_fs_i.h> | ||
| 37 | 38 | ||
| 38 | #include <asm/uaccess.h> | 39 | #include <asm/uaccess.h> | 
| 39 | #include <asm/unistd.h> | 40 | #include <asm/unistd.h> | 
| @@ -127,6 +128,11 @@ static void __exit_signal(struct task_struct *tsk) | |||
| 127 | } | 128 | } | 
| 128 | } | 129 | } | 
| 129 | 130 | ||
| 131 | static void delayed_put_task_struct(struct rcu_head *rhp) | ||
| 132 | { | ||
| 133 | put_task_struct(container_of(rhp, struct task_struct, rcu)); | ||
| 134 | } | ||
| 135 | |||
| 130 | void release_task(struct task_struct * p) | 136 | void release_task(struct task_struct * p) | 
| 131 | { | 137 | { | 
| 132 | int zap_leader; | 138 | int zap_leader; | 
| @@ -168,7 +174,7 @@ repeat: | |||
| 168 | spin_unlock(&p->proc_lock); | 174 | spin_unlock(&p->proc_lock); | 
| 169 | proc_pid_flush(proc_dentry); | 175 | proc_pid_flush(proc_dentry); | 
| 170 | release_thread(p); | 176 | release_thread(p); | 
| 171 | put_task_struct(p); | 177 | call_rcu(&p->rcu, delayed_put_task_struct); | 
| 172 | 178 | ||
| 173 | p = leader; | 179 | p = leader; | 
| 174 | if (unlikely(zap_leader)) | 180 | if (unlikely(zap_leader)) | 
| @@ -936,6 +942,9 @@ fastcall NORET_TYPE void do_exit(long code) | |||
| 936 | if (tsk->io_context) | 942 | if (tsk->io_context) | 
| 937 | exit_io_context(); | 943 | exit_io_context(); | 
| 938 | 944 | ||
| 945 | if (tsk->splice_pipe) | ||
| 946 | __free_pipe_info(tsk->splice_pipe); | ||
| 947 | |||
| 939 | /* PF_DEAD causes final put_task_struct after we schedule. */ | 948 | /* PF_DEAD causes final put_task_struct after we schedule. */ | 
| 940 | preempt_disable(); | 949 | preempt_disable(); | 
| 941 | BUG_ON(tsk->flags & PF_DEAD); | 950 | BUG_ON(tsk->flags & PF_DEAD); | 
