diff options
author | Madhuparna Bhowmik <[email protected]> | 2020-01-27 23:28:21 +0530 |
---|---|---|
committer | Christian Brauner <[email protected]> | 2020-02-28 13:34:36 +0100 |
commit | 0c282b068eb26db0e85e2ab4ec6d1e932acda841 (patch) | |
tree | 428651064e77e47c30c9ff551691ebf135bee3c4 | |
parent | bb6d3fb354c5ee8d6bde2d576eb7220ea09862b9 (diff) |
fork: Use RCU_INIT_POINTER() instead of rcu_access_pointer()
Use RCU_INIT_POINTER() instead of rcu_access_pointer() in
copy_sighand().
Suggested-by: Oleg Nesterov <[email protected]>
Signed-off-by: Madhuparna Bhowmik <[email protected]>
Acked-by: Oleg Nesterov <[email protected]>
Acked-by: Christian Brauner <[email protected]>
[[email protected]: edit commit message]
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Brauner <[email protected]>
-rw-r--r-- | kernel/fork.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 60a1295f4384..86425305cd4a 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -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; |