Skip to contentSkip to conversation

kernel: acct: kfree, also set related variable to NULL after kfree

PATCH Superseded Chen Gang 3 participants 3 messages Apr 10, 2013 – Apr 14, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 kernel: acct: kfree, also set related variable to NULL after kfree

after kfree acct, also set ns->bacct to NULL.

---
 kernel/acct.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
kernel/acct.c +1 -0
index 85389fe..91a23eb 100644
@@ -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);
Signature · 1 line
1.7.7.6
Acked-by Serge Hallyn on v1 1/1
#1 lore raw
Quoted 4 lines · Chen Gang

after kfree acct, also set ns->bacct to NULL.

Quoted 23 lines
---
 kernel/acct.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
kernel/acct.c +1 -0
index 85389fe..91a23eb 100644
@@ -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);
Signature · 6 lines
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/