lkml.org 
[lkml]   [2011]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] sched: mark parent and real_parent as __rcu
The parent and real_parent pointers should be considered __rcu, since
they should be held under either tasklist_lock or rcu_read_lock.

Signed-off-by: Kees Cook <keescook@chromium.org>
---
include/linux/sched.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 1c4f3e9..b05e8af 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1315,8 +1315,8 @@ struct task_struct {
* older sibling, respectively. (p->father can be replaced with
* p->real_parent->pid)
*/
- struct task_struct *real_parent; /* real parent process */
- struct task_struct *parent; /* recipient of SIGCHLD, wait4() reports */
+ struct task_struct __rcu *real_parent; /* real parent process */
+ struct task_struct __rcu *parent; /* recipient of SIGCHLD, wait4() reports */
/*
* children/sibling forms the list of my natural children
*/
--
1.7.0.4


\
 
 \ /
  Last update: 2011-12-14 23:45    [W:0.946 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site