https://github.com/torvalds/linux
Revision df8a09d1b8f9e693ec3f6b7e0162fc817f2cf0db authored by Andreea-Cristina Bernat on 16 March 2017, 16:27:45 UTC, committed by David Howells on 16 March 2017, 16:27:45 UTC
The use of "rcu_assign_pointer()" is NULLing out the pointer.
According to RCU_INIT_POINTER()'s block comment:
"1.   This use of RCU_INIT_POINTER() is NULLing out the pointer"
it is better to use it instead of rcu_assign_pointer() because it has a
smaller overhead.

The following Coccinelle semantic patch was used:
@@
@@

- rcu_assign_pointer
+ RCU_INIT_POINTER
  (..., NULL)

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
1 parent 1d7e4eb
History
Tip revision: df8a09d1b8f9e693ec3f6b7e0162fc817f2cf0db authored by Andreea-Cristina Bernat on 16 March 2017, 16:27:45 UTC
afs: security: Replace rcu_assign_pointer() with RCU_INIT_POINTER()
Tip revision: df8a09d
File Mode Size
.gitignore -rw-r--r-- 44 bytes
Kconfig -rw-r--r-- 2.6 KB
Makefile -rw-r--r-- 3.7 KB
system_certificates.S -rw-r--r-- 917 bytes
system_keyring.c -rw-r--r-- 6.8 KB

back to top