All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Johansen <john.johansen@canonical.com>
To: Kees Cook <keescook@chromium.org>
Cc: linux-kernel@vger.kernel.org, James Morris <jmorris@namei.org>,
	linux-security-module@vger.kernel.org
Subject: Re: [PATCH] apparmor: add missing rcu_dereference()
Date: Thu, 08 Dec 2011 16:50:01 -0800	[thread overview]
Message-ID: <4EE15B39.9050302@canonical.com> (raw)
In-Reply-To: <20111209002548.GA30520@www.outflux.net>

On 12/08/2011 04:25 PM, Kees Cook wrote:
> Adds a missed rcu_dereference() around real_parent.
> 
> Signed-off-by: Kees Cook <keescook@chromium.org>
> ---
>  security/apparmor/audit.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/security/apparmor/audit.c b/security/apparmor/audit.c
> index 96502b2..f3fafed 100644
> --- a/security/apparmor/audit.c
> +++ b/security/apparmor/audit.c
> @@ -133,7 +133,7 @@ static void audit_pre(struct audit_buffer *ab, void *ca)
>  		struct aa_profile *profile = sa->aad.profile;
>  		pid_t pid;
>  		rcu_read_lock();
> -		pid = tsk->real_parent->pid;
> +		pid = rcu_dereference(tsk->real_parent)->pid;
>  		rcu_read_unlock();
>  		audit_log_format(ab, " parent=%d", pid);
>  		if (profile->ns != root_ns) {
yep.

Acked-by: John Johansen <john.johansen@canonical.com>


  reply	other threads:[~2011-12-09  0:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-09  0:25 [PATCH] apparmor: add missing rcu_dereference() Kees Cook
2011-12-09  0:50 ` John Johansen [this message]
2011-12-09  1:09   ` James Morris

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=4EE15B39.9050302@canonical.com \
    --to=john.johansen@canonical.com \
    --cc=jmorris@namei.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.