Skip to contentSkip to conversation

sched: add missing rcu_deref around real_parent

PATCH Superseded Kees Cook 1 participant 1 message Dec 14, 2011

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 sched: add missing rcu_deref around real_parent

Wrap another real_parent dereference while under rcu_read_lock.

---
 kernel/sched.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/sched.c +1 -1
index d6b149c..407ed65 100644
@@ -6019,7 +6019,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);
Signature · 1 line
1.7.0.4