diff options
-rw-r--r-- | include/linux/sched/mm.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h index 8d3b7e731b74..ef54f4b3f1e4 100644 --- a/include/linux/sched/mm.h +++ b/include/linux/sched/mm.h @@ -167,7 +167,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; |