* [PATCH v2] kernel/acct.c: cleanup, also better to set related variable to NULL after kfree
[not found] ` <518D2004.8070400@asianux.com>
@ 2013-05-13 2:16 ` Chen Gang
0 siblings, 0 replies; only message in thread
From: Chen Gang @ 2013-05-13 2:16 UTC (permalink / raw)
To: Jeff Layton
Cc: Andrew Morton, Serge Hallyn, Al Viro, Eric W. Biederman,
Frederic Weisbecker, linux-kernel@vger.kernel.org
After kfree acct, also better to set ns->bacct to NULL.
Currently, it is as a cleanup patch.
Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
kernel/acct.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/kernel/acct.c b/kernel/acct.c
index 85389fe..91a23eb 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -332,6 +332,7 @@ void acct_exit_ns(struct pid_namespace *ns)
spin_lock(&acct_lock);
if (acct->file != NULL)
acct_file_reopen(acct, NULL, NULL);
+ ns->bacct = NULL;
spin_unlock(&acct_lock);
kfree(acct);
--
1.7.7.6
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-05-13 2:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <518CC9E3.1060304@asianux.com>
[not found] ` <20130510074809.0e930a28@corrin.poochiereds.net>
[not found] ` <518D02A0.1080306@asianux.com>
[not found] ` <518D2004.8070400@asianux.com>
2013-05-13 2:16 ` [PATCH v2] kernel/acct.c: cleanup, also better to set related variable to NULL after kfree Chen Gang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.