Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed384464 authored by Milos Vyletel's avatar Milos Vyletel Committed by Paul E. McKenney
Browse files

documentation: State that rcu_dereference() reloads pointer



Make a note stating that repeated calls of rcu_dereference() may not
return the same pointer if update happens while in critical section.

Reported-by: default avatarJeff Haran <jeff.haran@citrix.com>
Signed-off-by: default avatarMilos Vyletel <milos@redhat.com>
Reviewed-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
parent ee7c29be
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -256,7 +256,9 @@ rcu_dereference()
	If you are going to be fetching multiple fields from the
	RCU-protected structure, using the local variable is of
	course preferred.  Repeated rcu_dereference() calls look
	ugly and incur unnecessary overhead on Alpha CPUs.
	ugly, do not guarantee that the same pointer will be returned
	if an update happened while in the critical section, and incur
	unnecessary overhead on Alpha CPUs.

	Note that the value returned by rcu_dereference() is valid
	only within the enclosing RCU read-side critical section.