linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kernel: acct: kfree, also set related variable to NULL after kfree
@ 2013-04-10  9:17 Chen Gang
  2013-04-12 14:29 ` Serge E. Hallyn
  0 siblings, 1 reply; 3+ messages in thread
From: Chen Gang @ 2013-04-10  9:17 UTC (permalink / raw)
  To: Al Viro, Jeff Layton, Eric W. Biederman, Frederic Weisbecker,
	Serge Hallyn
  Cc: linux-kernel@vger.kernel.org >>
	"linux-kernel@vger.kernel.org"


  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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kernel: acct: kfree, also set related variable to NULL after kfree
  2013-04-10  9:17 [PATCH] kernel: acct: kfree, also set related variable to NULL after kfree Chen Gang
@ 2013-04-12 14:29 ` Serge E. Hallyn
  2013-04-14  5:59   ` Chen Gang F T
  0 siblings, 1 reply; 3+ messages in thread
From: Serge E. Hallyn @ 2013-04-12 14:29 UTC (permalink / raw)
  To: Chen Gang
  Cc: Al Viro, Jeff Layton, Eric W. Biederman, Frederic Weisbecker,
	Serge Hallyn,
	linux-kernel@vger.kernel.org >>
	"linux-kernel@vger.kernel.org"

Quoting Chen Gang (gang.chen@asianux.com):
> 
>   after kfree acct, also set ns->bacct to NULL.
> 
> Signed-off-by: Chen Gang <gang.chen@asianux.com>

Acked-by: Serge Hallyn <serge.hallyn@canonical.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
> --
> 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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kernel: acct: kfree, also set related variable to NULL after kfree
  2013-04-12 14:29 ` Serge E. Hallyn
@ 2013-04-14  5:59   ` Chen Gang F T
  0 siblings, 0 replies; 3+ messages in thread
From: Chen Gang F T @ 2013-04-14  5:59 UTC (permalink / raw)
  To: Serge E. Hallyn
  Cc: Chen Gang, Al Viro, Jeff Layton, Eric W. Biederman,
	Frederic Weisbecker, Serge Hallyn,
	linux-kernel@vger.kernel.org >>
	"linux-kernel@vger.kernel.org"

On 2013年04月12日 22:29, Serge E. Hallyn wrote:
> Quoting Chen Gang (gang.chen@asianux.com):
>> > 
>> >   after kfree acct, also set ns->bacct to NULL.
>> > 
>> > Signed-off-by: Chen Gang <gang.chen@asianux.com>
> Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
> 

  thanks.

-- 
Chen Gang

Flying Transformer

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-14  6:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-10  9:17 [PATCH] kernel: acct: kfree, also set related variable to NULL after kfree Chen Gang
2013-04-12 14:29 ` Serge E. Hallyn
2013-04-14  5:59   ` Chen Gang F T

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).