mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Kees Cook <keescook@chromium.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	glommer@parallels.com, a.p.zijlstra@chello.nl,
	keescook@chromium.org, suresh.b.siddha@intel.com,
	tglx@linutronix.de, kamezawa.hiroyu@jp.fujitsu.com,
	mingo@elte.hu
Subject: [tip:sched/core] sched: Add missing rcu_dereference() around -> real_parent usage
Date: Fri, 16 Dec 2011 03:35:23 -0800	[thread overview]
Message-ID: <tip-07cde2608a3b5c66515363f1b53623b1536b9785@git.kernel.org> (raw)
In-Reply-To: <20111215164918.GA13003@www.outflux.net>

Commit-ID:  07cde2608a3b5c66515363f1b53623b1536b9785
Gitweb:     http://git.kernel.org/tip/07cde2608a3b5c66515363f1b53623b1536b9785
Author:     Kees Cook <keescook@chromium.org>
AuthorDate: Thu, 15 Dec 2011 08:49:18 -0800
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 16 Dec 2011 09:42:09 +0100

sched: Add missing rcu_dereference() around ->real_parent usage

Wrap another ->real_parent dereference while under rcu_read_lock.

Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Glauber Costa <glommer@parallels.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Link: http://lkml.kernel.org/r/20111215164918.GA13003@www.outflux.net
[ tidied up the changelog ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/sched/core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 3c5b21e..c7ea688 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4784,7 +4784,7 @@ void sched_show_task(struct task_struct *p)
 	free = stack_not_used(p);
 #endif
 	printk(KERN_CONT "%5lu %5d %6d 0x%08lx\n", free,
-		task_pid_nr(p), task_pid_nr(p->real_parent),
+		task_pid_nr(p), task_pid_nr(rcu_dereference(p->real_parent)),
 		(unsigned long)task_thread_info(p)->flags);
 
 	show_stack(p, NULL);

      reply	other threads:[~2011-12-16 11:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-15 16:49 [PATCH v2] sched: add missing rcu_deref around real_parent Kees Cook
2011-12-16 11:35 ` tip-bot for Kees Cook [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=tip-07cde2608a3b5c66515363f1b53623b1536b9785@git.kernel.org \
    --to=keescook@chromium.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=glommer@parallels.com \
    --cc=hpa@zytor.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®