提交 97101eb4 编写于 作者: O Oleg Nesterov 提交者: Linus Torvalds

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: NOleg 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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 a705be6b
...@@ -144,7 +144,6 @@ static void __exit_signal(struct task_struct *tsk) ...@@ -144,7 +144,6 @@ static void __exit_signal(struct task_struct *tsk)
clear_tsk_thread_flag(tsk,TIF_SIGPENDING); clear_tsk_thread_flag(tsk,TIF_SIGPENDING);
if (group_dead) { if (group_dead) {
flush_sigqueue(&sig->shared_pending); flush_sigqueue(&sig->shared_pending);
taskstats_tgid_free(sig);
tty_kref_put(tty); tty_kref_put(tty);
} }
} }
......
...@@ -167,6 +167,7 @@ EXPORT_SYMBOL(free_task); ...@@ -167,6 +167,7 @@ EXPORT_SYMBOL(free_task);
static inline void free_signal_struct(struct signal_struct *sig) static inline void free_signal_struct(struct signal_struct *sig)
{ {
taskstats_tgid_free(sig);
kmem_cache_free(signal_cachep, sig); kmem_cache_free(signal_cachep, sig);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册