From: Chen Gang <gang.chen@asianux.com>
To: Al Viro <viro@zeniv.linux.org.uk>,
Jeff Layton <jlayton@redhat.com>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Serge Hallyn <serge.hallyn@canonical.com>
Cc: "linux-kernel@vger.kernel.org >>
\"linux-kernel@vger.kernel.org\"" <linux-kernel@vger.kernel.org>
Subject: [PATCH] kernel: acct: kfree, also set related variable to NULL after kfree
Date: Wed, 10 Apr 2013 17:17:37 +0800 [thread overview]
Message-ID: <51652E31.7090806@asianux.com> (raw)
after kfree acct, also set ns->bacct to NULL.
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
next reply other threads:[~2013-04-10 9:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 9:17 Chen Gang [this message]
2013-04-12 14:29 ` [PATCH] kernel: acct: kfree, also set related variable to NULL after kfree Serge E. Hallyn
2013-04-14 5:59 ` Chen Gang F T
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=51652E31.7090806@asianux.com \
--to=gang.chen@asianux.com \
--cc=ebiederm@xmission.com \
--cc=fweisbec@gmail.com \
--cc=jlayton@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=serge.hallyn@canonical.com \
--cc=viro@zeniv.linux.org.uk \
/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