Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936689Ab3DJJSN (ORCPT ); Wed, 10 Apr 2013 05:18:13 -0400 Received: from intranet.asianux.com ([58.214.24.6]:41647 "EHLO intranet.asianux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751888Ab3DJJSM (ORCPT ); Wed, 10 Apr 2013 05:18:12 -0400 X-Spam-Score: -100.8 Message-ID: <51652E31.7090806@asianux.com> Date: Wed, 10 Apr 2013 17:17:37 +0800 From: Chen Gang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Al Viro , Jeff Layton , "Eric W. Biederman" , Frederic Weisbecker , Serge Hallyn CC: "linux-kernel@vger.kernel.org >> \"linux-kernel@vger.kernel.org\"" Subject: [PATCH] kernel: acct: kfree, also set related variable to NULL after kfree Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 766 Lines: 27 after kfree acct, also set ns->bacct to NULL. Signed-off-by: Chen Gang --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/