locking/rtmutex: Use READ_ONCE() in rt_mutex_owner()
commitc6a5bf4cda12e4a3c097036ce7044ee65e4cf6d9
authorThomas Gleixner <tglx@linutronix.de>
Wed, 30 Nov 2016 21:04:42 +0000 (30 21:04 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Dec 2016 16:49:22 +0000 (15 08:49 -0800)
tree42ce0ac5376289656bf8bd94231143ada0bb40f9
parentb27d9147f24a501d632916964f77c1221246fae9
locking/rtmutex: Use READ_ONCE() in rt_mutex_owner()

commit 1be5d4fa0af34fb7bafa205aeb59f5c7cc7a089d upstream.

While debugging the rtmutex unlock vs. dequeue race Will suggested to use
READ_ONCE() in rt_mutex_owner() as it might race against the
cmpxchg_release() in unlock_rt_mutex_safe().

Will: "It's a minor thing which will most likely not matter in practice"

Careful search did not unearth an actual problem in todays code, but it's
better to be safe than surprised.

Suggested-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: David Daney <ddaney@caviumnetworks.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/20161130210030.431379999@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/locking/rtmutex_common.h