Re: [PATCH] fork.c: Use RCU_INIT_POINTER() instead of rcu_access_pointer()
From: Oleg Nesterov
Date: Tue Jan 28 2020 - 09:59:59 EST
On 01/27, madhuparnabhowmik10@xxxxxxxxx wrote:
>
> --- 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);
Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>