]> git.hungrycats.org Git - linux/commit
PARISC futex: special case cmpxchg NULL in kernel space
authorKyle McMartin <kyle@shortfin.cabal.ca>
Tue, 15 Apr 2008 15:45:11 +0000 (10:45 -0500)
committerChris Wright <chrisw@sous-sol.org>
Sat, 19 Apr 2008 01:53:29 +0000 (18:53 -0700)
commitfe23b328b6fd02f23a30690baf45a4092162d760
tree37ef264a0219f2f341659ceb23212b47750d41d3
parente9a3ef655c451a9dd1b4df795f6eac253eed6af0
PARISC futex: special case cmpxchg NULL in kernel space

upstream commit: c20a84c91048c76c1379011c96b1a5cee5c7d9a0

commit f9e77acd4060fefbb60a351cdb8d30fca27fe194
Author: Thomas Gleixner <tglx@linutronix.de>
Date:   Sun Feb 24 02:10:05 2008 +0000

    futex: runtime enable pi and robust functionality

which was backported to stable based on mainline Commit
a0c1e9073ef7428a14309cba010633a6cd6719ea added code to futex.c
to detect whether futex_atomic_cmpxchg_inatomic was implemented at run
time:

+       curval = cmpxchg_futex_value_locked(NULL, 0, 0);
+       if (curval == -EFAULT)
+               futex_cmpxchg_enabled = 1;

This is bogus on parisc, since page zero in kernel virtual space is the
gateway page for syscall entry, and should not be read from the kernel.
(That, and we really don't like the kernel faulting on its own address
 space...)

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
include/asm-parisc/futex.h