From 48fa072fe980f347934f378a87ea11fb8857cb92 Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Sat, 1 Mar 2008 10:25:52 -0800 Subject: [PATCH] --- yaml --- r: 87407 b: refs/heads/master c: c20a84c91048c76c1379011c96b1a5cee5c7d9a0 h: refs/heads/master i: 87405: 001ecb36437690f768123a86285db2c6a876b7cc 87403: fa6e5b6e885ddd3d951196b1a78cba1bf23fd5d8 87399: 387d32408746a020818985b2d95774d704a980e5 87391: ab99768d75ab83548794972c037b6ba9d3f7624d v: v3 --- [refs] | 2 +- trunk/include/asm-parisc/futex.h | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 9341536bedae..eb706d76e51f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dc39455e7948ec9bc5f3f2dced5c2f5ac8a8dfd9 +refs/heads/master: c20a84c91048c76c1379011c96b1a5cee5c7d9a0 diff --git a/trunk/include/asm-parisc/futex.h b/trunk/include/asm-parisc/futex.h index dbee6e60aa81..fdc6d055ef7f 100644 --- a/trunk/include/asm-parisc/futex.h +++ b/trunk/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*/