diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2007-01-09 10:18:50 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-01-09 10:18:50 +0100 |
commit | d8ad075ef60ca33f1bd8e227eed2202108fd6cd8 (patch) | |
tree | af7763b3cef733e8b98c72067aa457d74af33f5b /arch/s390/lib/uaccess_pt.c | |
parent | de338a3795bbcb3c3d77591f65118cbec776cc39 (diff) | |
download | op-kernel-dev-d8ad075ef60ca33f1bd8e227eed2202108fd6cd8.zip op-kernel-dev-d8ad075ef60ca33f1bd8e227eed2202108fd6cd8.tar.gz |
[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 'arch/s390/lib/uaccess_pt.c')
-rw-r--r-- | arch/s390/lib/uaccess_pt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/lib/uaccess_pt.c b/arch/s390/lib/uaccess_pt.c index 633249c..49c3e46 100644 --- a/arch/s390/lib/uaccess_pt.c +++ b/arch/s390/lib/uaccess_pt.c @@ -8,6 +8,7 @@ */ #include <linux/errno.h> +#include <linux/hardirq.h> #include <linux/mm.h> #include <asm/uaccess.h> #include <asm/futex.h> @@ -18,6 +19,8 @@ static inline int __handle_fault(struct mm_struct *mm, unsigned long address, struct vm_area_struct *vma; int ret = -EFAULT; + if (in_atomic()) + return ret; down_read(&mm->mmap_sem); vma = find_vma(mm, address); if (unlikely(!vma)) |