aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched/mm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sched/mm.h')
-rw-r--r--include/linux/sched/mm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h
index efb9e12e7f91..c16f927570b0 100644
--- a/include/linux/sched/mm.h
+++ b/include/linux/sched/mm.h
@@ -171,7 +171,8 @@ static inline bool in_vfork(struct task_struct *tsk)
* another oom-unkillable task does this it should blame itself.
*/
rcu_read_lock();
- ret = tsk->vfork_done && tsk->real_parent->mm == tsk->mm;
+ ret = tsk->vfork_done &&
+ rcu_dereference(tsk->real_parent)->mm == tsk->mm;
rcu_read_unlock();
return ret;