aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-06-11 20:45:41 +0000
committerAnders Roxell <anders.roxell@linaro.org>2015-06-01 12:03:34 +0200
commit72e413d1ef98ecb67e88dacc25a963df2426b822 (patch)
treecf815c0a73568c2adc2dc5391128721c4546810c /drivers
parenta8067375cfdd3458055a1f41057283576bfd7cd6 (diff)
futex: Simplify futex_lock_pi_atomic() and make it more robust
upstream commit: af54d6a1c3ad474bbc9893c9905022646be6092c futex_lock_pi_atomic() is a maze of retry hoops and loops. Reduce it to simple and understandable states: First step is to lookup existing waiters (state) in the kernel. If there is an existing waiter, validate it and attach to it. If there is no existing waiter, check the user space value If the TID encoded in the user space value is 0, take over the futex preserving the owner died bit. If the TID encoded in the user space value is != 0, lookup the owner task, validate it and attach to it. Reduces text size by 128 bytes on x8664. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Davidlohr Bueso <davidlohr@hp.com> Cc: Kees Cook <kees@outflux.net> Cc: wad@chromium.org Cc: Darren Hart <darren@dvhart.com> Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1406131137020.5170@nanos Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions