aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2007-01-09 10:18:50 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-01-09 10:18:50 +0100
commitd8ad075ef60ca33f1bd8e227eed2202108fd6cd8 (patch)
treeaf7763b3cef733e8b98c72067aa457d74af33f5b /include/asm-s390
parentde338a3795bbcb3c3d77591f65118cbec776cc39 (diff)
downloadkernel_samsung_tuna-d8ad075ef60ca33f1bd8e227eed2202108fd6cd8.zip
kernel_samsung_tuna-d8ad075ef60ca33f1bd8e227eed2202108fd6cd8.tar.gz
kernel_samsung_tuna-d8ad075ef60ca33f1bd8e227eed2202108fd6cd8.tar.bz2
[S390] don't call handle_mm_fault() if in an atomic context.
There are several places in the futex code where a spin_lock is held and still uaccesses happen. Deadlocks are avoided by increasing the preempt count. The pagefault handler will then not take any locks but will immediately search the fixup tables. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'include/asm-s390')
-rw-r--r--include/asm-s390/futex.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/asm-s390/futex.h b/include/asm-s390/futex.h
index 5e261e1..5c5d02d 100644
--- a/include/asm-s390/futex.h
+++ b/include/asm-s390/futex.h
@@ -4,8 +4,8 @@
#ifdef __KERNEL__
#include <linux/futex.h>
+#include <linux/uaccess.h>
#include <asm/errno.h>
-#include <asm/uaccess.h>
static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
{
@@ -21,7 +21,9 @@ static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
return -EFAULT;
+ pagefault_disable();
ret = uaccess.futex_atomic_op(op, uaddr, oparg, &oldval);
+ pagefault_enable();
if (!ret) {
switch (cmp) {