From: Randy Dunlap <randy.dunlap@oracle.com>
To: Pavel Emelyanov <xemul@openvz.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Bsdacct: stir up comments around acct_process.
Date: Fri, 16 May 2008 08:48:40 -0700 [thread overview]
Message-ID: <20080516084840.dfb4cd8d.randy.dunlap@oracle.com> (raw)
In-Reply-To: <482D6803.60205@openvz.org>
On Fri, 16 May 2008 14:54:59 +0400 Pavel Emelyanov wrote:
> Fix the one describing what this function is and add one
> more - about locking absence around pid namespaces loop.
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
>
> ---
>
> diff --git a/kernel/acct.c b/kernel/acct.c
> index 0feba97..d7b670c 100644
> --- a/kernel/acct.c
> +++ b/kernel/acct.c
> @@ -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 int turn is a wrapper around do_acct_process.
in
> *
> * 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 it still
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);
> }
---
~Randy
prev parent reply other threads:[~2008-05-16 15:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-16 10:54 [PATCH] Bsdacct: stir up comments around acct_process Pavel Emelyanov
2008-05-16 15:48 ` Randy Dunlap [this message]
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=20080516084840.dfb4cd8d.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xemul@openvz.org \
/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