diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/exit.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index bc0ec674d3f4..6c2eeb8f6390 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -127,6 +127,11 @@ static void __exit_signal(struct task_struct *tsk) | |||
127 | } | 127 | } |
128 | } | 128 | } |
129 | 129 | ||
130 | static void delayed_put_task_struct(struct rcu_head *rhp) | ||
131 | { | ||
132 | put_task_struct(container_of(rhp, struct task_struct, rcu)); | ||
133 | } | ||
134 | |||
130 | void release_task(struct task_struct * p) | 135 | void release_task(struct task_struct * p) |
131 | { | 136 | { |
132 | int zap_leader; | 137 | int zap_leader; |
@@ -168,7 +173,7 @@ repeat: | |||
168 | spin_unlock(&p->proc_lock); | 173 | spin_unlock(&p->proc_lock); |
169 | proc_pid_flush(proc_dentry); | 174 | proc_pid_flush(proc_dentry); |
170 | release_thread(p); | 175 | release_thread(p); |
171 | put_task_struct(p); | 176 | call_rcu(&p->rcu, delayed_put_task_struct); |
172 | 177 | ||
173 | p = leader; | 178 | p = leader; |
174 | if (unlikely(zap_leader)) | 179 | if (unlikely(zap_leader)) |