]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] unshare: Use rcu_assign_pointer when setting sighand
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 16 Mar 2006 17:31:38 +0000 (10:31 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 17 Mar 2006 15:46:59 +0000 (07:46 -0800)
commit53dfa0b8ff832f55095342b93c4de0ae83ea8c54
treee6f6442aca13fe9d20d149ed9b414f038d90778f
parent9f47ea05a57cbcf18a31adee14d7906247d43e91
[PATCH] unshare: Use rcu_assign_pointer when setting sighand

The sighand pointer only needs the rcu_read_lock on the
read side.  So only depending on task_lock protection
when setting this pointer is not enough.  We also need
a memory barrier to ensure the initialization is seen first.

Use rcu_assign_pointer as it does this for us, and clearly
documents that we are setting an rcu readable pointer.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/fork.c