Introduce ptr_eq() to compare two addresses while preserving the address dependencies for later use of the address. It should be used when comparing an address returned by rcu_dereference(). Thanks, Mathieu Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Cc: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> Cc: "Paul E. McKenney" <paulmck@xxxxxxxxxx> Cc: Will Deacon <will@xxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Boqun Feng <boqun.feng@xxxxxxxxx> Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> Cc: John Stultz <jstultz@xxxxxxxxxx> Cc: Neeraj Upadhyay <Neeraj.Upadhyay@xxxxxxx> Cc: Boqun Feng <boqun.feng@xxxxxxxxx> Cc: Frederic Weisbecker <frederic@xxxxxxxxxx> Cc: Joel Fernandes <joel@xxxxxxxxxxxxxxxxx> Cc: Josh Triplett <josh@xxxxxxxxxxxxxxxx> Cc: Uladzislau Rezki <urezki@xxxxxxxxx> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx> Cc: Lai Jiangshan <jiangshanlai@xxxxxxxxx> Cc: Zqiang <qiang.zhang1211@xxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Waiman Long <longman@xxxxxxxxxx> Cc: Mark Rutland <mark.rutland@xxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Cc: maged.michael@xxxxxxxxx Cc: Mateusz Guzik <mjguzik@xxxxxxxxx> Cc: Gary Guo <gary@xxxxxxxxxxx> Cc: Jonas Oberhauser <jonas.oberhauser@xxxxxxxxxxxxxxx> Cc: rcu@xxxxxxxxxxxxxxx Cc: linux-mm@xxxxxxxxx Cc: lkmm@xxxxxxxxxxxxxxx Mathieu Desnoyers (2): compiler.h: Introduce ptr_eq() to preserve address dependency Documentation: RCU: Refer to ptr_eq() Documentation/RCU/rcu_dereference.rst | 34 ++++++++++++--- include/linux/compiler.h | 62 +++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 5 deletions(-) -- 2.39.2