From d8ad075ef60ca33f1bd8e227eed2202108fd6cd8 Mon Sep 17 00:00:00 2001 From: Heiko Carstens Date: Tue, 9 Jan 2007 10:18:50 +0100 Subject: [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 Signed-off-by: Martin Schwidefsky --- include/asm-s390/futex.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-s390/futex.h b/include/asm-s390/futex.h index 5e261e1de67..5c5d02de49e 100644 --- a/include/asm-s390/futex.h +++ b/include/asm-s390/futex.h @@ -4,8 +4,8 @@ #ifdef __KERNEL__ #include +#include #include -#include 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) { -- cgit v1.2.3