Merge branch 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebieder...
[linux-2.6-block.git] / arch / s390 / mm / fault.c
index 79afed544cacef2f28ae2a64b8086dd15802f8b8..0ba174f779daf54abd2b3a4bf91fb3f9d8f8d69a 100644 (file)
@@ -83,9 +83,8 @@ static inline int notify_page_fault(struct pt_regs *regs)
 
 /*
  * Find out which address space caused the exception.
- * Access register mode is impossible, ignore space == 3.
  */
-static inline enum fault_type get_fault_type(struct pt_regs *regs)
+static enum fault_type get_fault_type(struct pt_regs *regs)
 {
        unsigned long trans_exc_code;
 
@@ -108,6 +107,10 @@ static inline enum fault_type get_fault_type(struct pt_regs *regs)
                }
                return VDSO_FAULT;
        }
+       if (trans_exc_code == 1) {
+               /* access register mode, not used in the kernel */
+               return USER_FAULT;
+       }
        /* home space exception -> access via kernel ASCE */
        return KERNEL_FAULT;
 }
@@ -211,6 +214,8 @@ static void dump_fault_info(struct pt_regs *regs)
                asce = S390_lowcore.kernel_asce;
                pr_cont("kernel ");
                break;
+       default:
+               unreachable();
        }
        pr_cont("ASCE.\n");
        dump_pagetable(asce, regs->int_parm_long & __FAIL_ADDR_MASK);