diff options
Diffstat (limited to 'arch/s390/lib')
-rw-r--r-- | arch/s390/lib/uaccess_pt.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/s390/lib/uaccess_pt.c b/arch/s390/lib/uaccess_pt.c index 63181671e3e3..60604b2819b2 100644 --- a/arch/s390/lib/uaccess_pt.c +++ b/arch/s390/lib/uaccess_pt.c | |||
@@ -20,6 +20,7 @@ static int __handle_fault(struct mm_struct *mm, unsigned long address, | |||
20 | { | 20 | { |
21 | struct vm_area_struct *vma; | 21 | struct vm_area_struct *vma; |
22 | int ret = -EFAULT; | 22 | int ret = -EFAULT; |
23 | int fault; | ||
23 | 24 | ||
24 | if (in_atomic()) | 25 | if (in_atomic()) |
25 | return ret; | 26 | return ret; |
@@ -44,20 +45,18 @@ static int __handle_fault(struct mm_struct *mm, unsigned long address, | |||
44 | } | 45 | } |
45 | 46 | ||
46 | survive: | 47 | survive: |
47 | switch (handle_mm_fault(mm, vma, address, write_access)) { | 48 | fault = handle_mm_fault(mm, vma, address, write_access); |
48 | case VM_FAULT_MINOR: | 49 | if (unlikely(fault & VM_FAULT_ERROR)) { |
49 | current->min_flt++; | 50 | if (fault & VM_FAULT_OOM) |
50 | break; | 51 | goto out_of_memory; |
51 | case VM_FAULT_MAJOR: | 52 | else if (fault & VM_FAULT_SIGBUS) |
52 | current->maj_flt++; | 53 | goto out_sigbus; |
53 | break; | ||
54 | case VM_FAULT_SIGBUS: | ||
55 | goto out_sigbus; | ||
56 | case VM_FAULT_OOM: | ||
57 | goto out_of_memory; | ||
58 | default: | ||
59 | BUG(); | 54 | BUG(); |
60 | } | 55 | } |
56 | if (fault & VM_FAULT_MAJOR) | ||
57 | current->maj_flt++; | ||
58 | else | ||
59 | current->min_flt++; | ||
61 | ret = 0; | 60 | ret = 0; |
62 | out: | 61 | out: |
63 | up_read(&mm->mmap_sem); | 62 | up_read(&mm->mmap_sem); |