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
Raw File
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
.cocciconfig
[spatch]
	options = --timeout 200
	options = --use-gitgrep
back to top