]> git.baikalelectronics.ru Git - kernel.git/commit
[PARISC] futex: special case cmpxchg NULL in kernel space
authorKyle McMartin <kyle@shortfin.cabal.ca>
Sat, 1 Mar 2008 18:25:52 +0000 (10:25 -0800)
committerKyle McMartin <kyle@shortfin.cabal.ca>
Sun, 16 Mar 2008 02:12:17 +0000 (19:12 -0700)
commitff94b677ed49b252c0a07def347f01991f152587
treeffc1f1795b9e156ce54f3f9d8915730d1c60635a
parent67565a020d07e942a0a789f16f24b2fba4c04f27
[PARISC] futex: special case cmpxchg NULL in kernel space

Commit dda3a43bdd964d176d414219c90698077c9acba5 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>
include/asm-parisc/futex.h