* [merged] bsdacct-use-del_timer_sync-in-acct_exit_ns.patch removed from -mm tree
@ 2010-05-12 14:58 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2010-05-12 14:58 UTC (permalink / raw)
To: vgusev, xemul, mm-commits
The patch titled
bsdacct: use del_timer_sync() in acct_exit_ns()
has been removed from the -mm tree. Its filename was
bsdacct-use-del_timer_sync-in-acct_exit_ns.patch
This patch was dropped because it was merged into mainline or a subsystem tree
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: bsdacct: use del_timer_sync() in acct_exit_ns()
From: Vitaliy Gusev <vgusev@openvz.org>
acct_exit_ns --> acct_file_reopen deletes timer without check timer
execution on other CPUs. So acct_timeout() can change an unmapped memory.
Signed-off-by: Vitaliy Gusev <vgusev@openvz.org>
Cc: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/acct.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff -puN kernel/acct.c~bsdacct-use-del_timer_sync-in-acct_exit_ns kernel/acct.c
--- a/kernel/acct.c~bsdacct-use-del_timer_sync-in-acct_exit_ns
+++ a/kernel/acct.c
@@ -353,17 +353,18 @@ restart:
void acct_exit_ns(struct pid_namespace *ns)
{
- struct bsd_acct_struct *acct;
+ struct bsd_acct_struct *acct = ns->bacct;
- spin_lock(&acct_lock);
- acct = ns->bacct;
- if (acct != NULL) {
- if (acct->file != NULL)
- acct_file_reopen(acct, NULL, NULL);
+ if (acct == NULL)
+ return;
- kfree(acct);
- }
+ del_timer_sync(&acct->timer);
+ spin_lock(&acct_lock);
+ if (acct->file != NULL)
+ acct_file_reopen(acct, NULL, NULL);
spin_unlock(&acct_lock);
+
+ kfree(acct);
}
/*
_
Patches currently in -mm which might be from vgusev@openvz.org are
origin.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-12 18:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-12 14:58 [merged] bsdacct-use-del_timer_sync-in-acct_exit_ns.patch removed from -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox