]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/acct.c
Merge branch 'for-2.6.27' of git://linux-nfs.org/~bfields/linux
[karo-tx-linux.git] / kernel / acct.c
index 0feba97e114e4025040e8c73f5accb133c9a4f03..dd68b905941818df3253e6f60558a49b9fbf2ef4 100644 (file)
@@ -657,7 +657,8 @@ static void acct_process_in_ns(struct pid_namespace *ns)
 }
 
 /**
- * acct_process - now just a wrapper around do_acct_process
+ * acct_process - now just a wrapper around acct_process_in_ns,
+ * which in turn is a wrapper around do_acct_process.
  *
  * handles process accounting for an exiting task
  */
@@ -665,6 +666,11 @@ void acct_process(void)
 {
        struct pid_namespace *ns;
 
+       /*
+        * This loop is safe lockless, since current is still
+        * alive and holds its namespace, which in turn holds
+        * its parent.
+        */
        for (ns = task_active_pid_ns(current); ns != NULL; ns = ns->parent)
                acct_process_in_ns(ns);
 }