* [PATCH] fork.c: Use RCU_INIT_POINTER() instead of rcu_access_pointer()
@ 2020-01-27 17:58 madhuparnabhowmik10
2020-01-28 9:04 ` Christian Brauner
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: madhuparnabhowmik10 @ 2020-01-27 17:58 UTC (permalink / raw)
To: oleg, christian.brauner, mingo
Cc: linux-kernel, paulmck, joel, frextrite, rcu,
linux-kernel-mentees, Madhuparna Bhowmik
From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Use RCU_INIT_POINTER() instead of rcu_access_pointer() in
copy_sighand().
Suggested-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
---
kernel/fork.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/fork.c b/kernel/fork.c
index 2508a4f238a3..42b71d4a50cb 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;
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fork.c: Use RCU_INIT_POINTER() instead of rcu_access_pointer()
2020-01-27 17:58 [PATCH] fork.c: Use RCU_INIT_POINTER() instead of rcu_access_pointer() madhuparnabhowmik10
@ 2020-01-28 9:04 ` Christian Brauner
2020-01-28 14:59 ` Oleg Nesterov
2020-01-28 17:52 ` Christian Brauner
2 siblings, 0 replies; 4+ messages in thread
From: Christian Brauner @ 2020-01-28 9:04 UTC (permalink / raw)
To: madhuparnabhowmik10
Cc: oleg, mingo, linux-kernel, paulmck, joel, frextrite, rcu,
linux-kernel-mentees
On Mon, Jan 27, 2020 at 11:28:21PM +0530, madhuparnabhowmik10@gmail.com wrote:
> From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
>
> Use RCU_INIT_POINTER() instead of rcu_access_pointer() in
> copy_sighand().
>
> Suggested-by: Oleg Nesterov <oleg@redhat.com>
> Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Thanks!
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fork.c: Use RCU_INIT_POINTER() instead of rcu_access_pointer()
2020-01-27 17:58 [PATCH] fork.c: Use RCU_INIT_POINTER() instead of rcu_access_pointer() madhuparnabhowmik10
2020-01-28 9:04 ` Christian Brauner
@ 2020-01-28 14:59 ` Oleg Nesterov
2020-01-28 17:52 ` Christian Brauner
2 siblings, 0 replies; 4+ messages in thread
From: Oleg Nesterov @ 2020-01-28 14:59 UTC (permalink / raw)
To: madhuparnabhowmik10
Cc: christian.brauner, mingo, linux-kernel, paulmck, joel, frextrite,
rcu, linux-kernel-mentees
On 01/27, madhuparnabhowmik10@gmail.com 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@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fork.c: Use RCU_INIT_POINTER() instead of rcu_access_pointer()
2020-01-27 17:58 [PATCH] fork.c: Use RCU_INIT_POINTER() instead of rcu_access_pointer() madhuparnabhowmik10
2020-01-28 9:04 ` Christian Brauner
2020-01-28 14:59 ` Oleg Nesterov
@ 2020-01-28 17:52 ` Christian Brauner
2 siblings, 0 replies; 4+ messages in thread
From: Christian Brauner @ 2020-01-28 17:52 UTC (permalink / raw)
To: madhuparnabhowmik10
Cc: oleg, mingo, linux-kernel, paulmck, joel, frextrite, rcu,
linux-kernel-mentees
On Mon, Jan 27, 2020 at 11:28:21PM +0530, madhuparnabhowmik10@gmail.com wrote:
> From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
>
> Use RCU_INIT_POINTER() instead of rcu_access_pointer() in
> copy_sighand().
>
> Suggested-by: Oleg Nesterov <oleg@redhat.com>
> Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Applied, queued up for post rc1.
Thanks!
Christian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-01-28 17:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-27 17:58 [PATCH] fork.c: Use RCU_INIT_POINTER() instead of rcu_access_pointer() madhuparnabhowmik10
2020-01-28 9:04 ` Christian Brauner
2020-01-28 14:59 ` Oleg Nesterov
2020-01-28 17:52 ` Christian Brauner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).