summaryrefslogtreecommitdiffstats
path: root/include/asm-parisc/futex.h
diff options
context:
space:
mode:
authorTrond Myklebust2008-03-19 22:59:44 +0100
committerTrond Myklebust2008-03-19 22:59:44 +0100
commitc7c350e92aab1bba68f26a6027b734adcf9824ba (patch)
treeaa99bd94c3049dd871d9c030d70a5f3d87591a95 /include/asm-parisc/futex.h
parentNFS: fix encode_fsinfo_maxsz (diff)
parentnfs: don't ignore return value from nfs_pageio_add_request (diff)
downloadkernel-qcow2-linux-c7c350e92aab1bba68f26a6027b734adcf9824ba.tar.gz
kernel-qcow2-linux-c7c350e92aab1bba68f26a6027b734adcf9824ba.tar.xz
kernel-qcow2-linux-c7c350e92aab1bba68f26a6027b734adcf9824ba.zip
Merge branch 'hotfixes' into devel
Diffstat (limited to 'include/asm-parisc/futex.h')
-rw-r--r--include/asm-parisc/futex.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/asm-parisc/futex.h b/include/asm-parisc/futex.h
index dbee6e60aa81..fdc6d055ef7f 100644
--- a/include/asm-parisc/futex.h
+++ b/include/asm-parisc/futex.h
@@ -56,6 +56,12 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
int err = 0;
int uval;
+ /* futex.c wants to do a cmpxchg_inatomic on kernel NULL, which is
+ * our gateway page, and causes no end of trouble...
+ */
+ if (segment_eq(KERNEL_DS, get_fs()) && !uaddr)
+ return -EFAULT;
+
if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
return -EFAULT;
@@ -67,5 +73,5 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
return uval;
}
-#endif
-#endif
+#endif /*__KERNEL__*/
+#endif /*_ASM_PARISC_FUTEX_H*/