aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2010-05-26 17:43:20 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-27 12:12:46 -0400
commit97101eb41d0d3c97543878ce40e0b8a8b2747ed7 (patch)
treed33299c8d4787d3b578ea432fdaceb965a2acd97
parenta705be6b5e8b05f2ae51536ec709de921960326c (diff)
exit: move taskstats_tgid_free() from __exit_signal() to free_signal_struct()
Move taskstats_tgid_free() from __exit_signal() to free_signal_struct(). This way signal->stats never points to nowhere and we can read ->stats lockless. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Balbir Singh <balbir@linux.vnet.ibm.com> Cc: Roland McGrath <roland@redhat.com> Cc: Veaceslav Falico <vfalico@redhat.com> Cc: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--kernel/exit.c1
-rw-r--r--kernel/fork.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 3602f468e3a0..357d443d5a00 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -144,7 +144,6 @@ static void __exit_signal(struct task_struct *tsk)
144 clear_tsk_thread_flag(tsk,TIF_SIGPENDING); 144 clear_tsk_thread_flag(tsk,TIF_SIGPENDING);
145 if (group_dead) { 145 if (group_dead) {
146 flush_sigqueue(&sig->shared_pending); 146 flush_sigqueue(&sig->shared_pending);
147 taskstats_tgid_free(sig);
148 tty_kref_put(tty); 147 tty_kref_put(tty);
149 } 148 }
150} 149}
diff --git a/kernel/fork.c b/kernel/fork.c
index 58f8611b1ac6..7701470ea1b8 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -167,6 +167,7 @@ EXPORT_SYMBOL(free_task);
167 167
168static inline void free_signal_struct(struct signal_struct *sig) 168static inline void free_signal_struct(struct signal_struct *sig)
169{ 169{
170 taskstats_tgid_free(sig);
170 kmem_cache_free(signal_cachep, sig); 171 kmem_cache_free(signal_cachep, sig);
171} 172}
172 173