aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/kernel/trap.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/arch/um/kernel/trap.c b/arch/um/kernel/trap.c
index abab90c3803f..3850d53f79fd 100644
--- a/arch/um/kernel/trap.c
+++ b/arch/um/kernel/trap.c
@@ -76,23 +76,24 @@ good_area:
76 goto out; 76 goto out;
77 77
78 do { 78 do {
79 int fault;
79survive: 80survive:
80 switch (handle_mm_fault(mm, vma, address, is_write)){ 81 fault = handle_mm_fault(mm, vma, address, is_write);
81 case VM_FAULT_MINOR: 82 if (unlikely(fault & VM_FAULT_ERROR)) {
82 current->min_flt++; 83 if (fault & VM_FAULT_OOM) {
83 break; 84 err = -ENOMEM;
84 case VM_FAULT_MAJOR: 85 goto out_of_memory;
85 current->maj_flt++; 86 } else if (fault & VM_FAULT_SIGBUS) {
86 break; 87 err = -EACCES;
87 case VM_FAULT_SIGBUS: 88 goto out;
88 err = -EACCES; 89 }
89 goto out;
90 case VM_FAULT_OOM:
91 err = -ENOMEM;
92 goto out_of_memory;
93 default:
94 BUG(); 90 BUG();
95 } 91 }
92 if (fault & VM_FAULT_MAJOR)
93 current->maj_flt++;
94 else
95 current->min_flt++;
96
96 pgd = pgd_offset(mm, address); 97 pgd = pgd_offset(mm, address);
97 pud = pud_offset(pgd, address); 98 pud = pud_offset(pgd, address);
98 pmd = pmd_offset(pud, address); 99 pmd = pmd_offset(pud, address);