* [PATCH v2] sched: add missing rcu_deref around real_parent
@ 2011-12-15 16:49 Kees Cook
2011-12-16 11:35 ` [tip:sched/core] sched: Add missing rcu_dereference() around -> real_parent usage tip-bot for Kees Cook
0 siblings, 1 reply; 2+ messages in thread
From: Kees Cook @ 2011-12-15 16:49 UTC (permalink / raw)
To: linux-kernel
Cc: Ingo Molnar, Peter Zijlstra, Glauber Costa, Suresh Siddha,
KAMEZAWA Hiroyuki
Wrap another real_parent dereference while under rcu_read_lock.
Signed-off-by: Kees Cook <keescook@chromium.org>
---
v2: rebase to korg/tip/tip.git
---
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);
--
1.7.0.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:sched/core] sched: Add missing rcu_dereference() around -> real_parent usage
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
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Kees Cook @ 2011-12-16 11:35 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, glommer, a.p.zijlstra, keescook,
suresh.b.siddha, tglx, kamezawa.hiroyu, mingo
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-16 11:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-15 16:49 [PATCH v2] sched: add missing rcu_deref around real_parent Kees Cook
2011-12-16 11:35 ` [tip:sched/core] sched: Add missing rcu_dereference() around -> real_parent usage tip-bot for Kees Cook
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®