Skip to content

Commit 0c282b0

Browse files
Madhuparna BhowmikChristian Brauner
authored andcommitted
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]>
1 parent bb6d3fb commit 0c282b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/fork.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1508,7 +1508,7 @@ static int copy_sighand(unsigned long clone_flags, struct task_struct *tsk)
15081508
return 0;
15091509
}
15101510
sig = kmem_cache_alloc(sighand_cachep, GFP_KERNEL);
1511-
rcu_assign_pointer(tsk->sighand, sig);
1511+
RCU_INIT_POINTER(tsk->sighand, sig);
15121512
if (!sig)
15131513
return -ENOMEM;
15141514

0 commit comments

Comments
 (0)