Commit 0c282b06 authored by Madhuparna Bhowmik's avatar Madhuparna Bhowmik Committed by Christian Brauner

fork: Use RCU_INIT_POINTER() instead of rcu_access_pointer()

Use RCU_INIT_POINTER() instead of rcu_access_pointer() in
copy_sighand().
Suggested-by: default avatarOleg Nesterov <oleg@redhat.com>
Signed-off-by: default avatarMadhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Acked-by: default avatarOleg Nesterov <oleg@redhat.com>
Acked-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
[christian.brauner@ubuntu.com: edit commit message]
Link: https://lore.kernel.org/r/20200127175821.10833-1-madhuparnabhowmik10@gmail.comSigned-off-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
parent bb6d3fb3
......@@ -1508,7 +1508,7 @@ static int copy_sighand(unsigned long clone_flags, struct task_struct *tsk)
return 0;
}
sig = kmem_cache_alloc(sighand_cachep, GFP_KERNEL);
rcu_assign_pointer(tsk->sighand, sig);
RCU_INIT_POINTER(tsk->sighand, sig);
if (!sig)
return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment