From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>,
Roland McGrath <roland@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH -mm 3/3] exit: move taskstats_tgid_free() from __exit_signal() to free_signal_struct()
Date: Sun, 21 Mar 2010 19:47:57 +0100 [thread overview]
Message-ID: <20100321184757.GA29078@redhat.com> (raw)
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>
---
kernel/exit.c | 1 -
kernel/fork.c | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
--- 34-rc1/kernel/exit.c~13_SIGNAL_STATS 2010-03-21 18:34:02.000000000 +0100
+++ 34-rc1/kernel/exit.c 2010-03-21 18:36:44.000000000 +0100
@@ -145,7 +145,6 @@ static void __exit_signal(struct task_st
clear_tsk_thread_flag(tsk,TIF_SIGPENDING);
if (group_dead) {
flush_sigqueue(&sig->shared_pending);
- taskstats_tgid_free(sig);
tty_kref_put(tty);
}
}
--- 34-rc1/kernel/fork.c~13_SIGNAL_STATS 2010-03-21 18:35:01.000000000 +0100
+++ 34-rc1/kernel/fork.c 2010-03-21 18:37:31.000000000 +0100
@@ -160,6 +160,7 @@ EXPORT_SYMBOL(free_task);
static inline void free_signal_struct(struct signal_struct *sig)
{
+ taskstats_tgid_free(sig);
kmem_cache_free(signal_cachep, sig);
}
reply other threads:[~2010-03-21 18:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100321184757.GA29078@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox