Michel Lespinasse 37a9d912b2 futex: Sanitize cmpxchg_futex_value_locked API
The cmpxchg_futex_value_locked API was funny in that it returned either
the original, user-exposed futex value OR an error code such as -EFAULT.
This was confusing at best, and could be a source of livelocks in places
that retry the cmpxchg_futex_value_locked after trying to fix the issue
by running fault_in_user_writeable().
    
This change makes the cmpxchg_futex_value_locked API more similar to the
get_futex_value_locked one, returning an error code and updating the
original value through a reference argument.
    
Signed-off-by: Michel Lespinasse <walken@google.com>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>  [tile]
Acked-by: Tony Luck <tony.luck@intel.com>  [ia64]
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Michal Simek <monstr@monstr.eu>  [microblaze]
Acked-by: David Howells <dhowells@redhat.com> [frv]
Cc: Darren Hart <darren@dvhart.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <20110311024851.GC26122@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-11 12:23:08 +01:00
..
2009-03-27 14:25:27 +01:00
2009-10-29 22:34:15 +09:00
2010-08-04 10:45:17 +02:00
2010-10-21 15:51:41 +10:00
2010-10-21 15:51:39 +10:00
2009-03-27 14:25:33 +01:00
2009-03-27 14:25:35 +01:00
2009-05-22 09:50:46 +02:00
2010-08-04 10:45:17 +02:00
2010-06-09 11:12:36 +02:00
2009-03-27 14:25:42 +01:00
2010-10-21 15:51:20 +10:00
2011-02-07 19:12:30 +01:00
2009-03-27 14:25:44 +01:00
2010-04-01 08:38:19 +02:00
2011-01-03 10:01:29 +01:00
2010-10-21 15:51:25 +10:00
2009-03-27 14:25:15 +01:00
2009-07-06 10:26:57 +02:00
2009-03-27 14:25:39 +01:00
2009-07-06 10:26:59 +02:00
2011-01-16 14:29:21 +01:00
2010-04-01 08:38:24 +02:00
2010-08-04 10:22:35 +02:00