diff --git a/arch/s390/include/asm/stacktrace.h b/arch/s390/include/asm/stacktrace.h index 49634bfbecdd084daa1e01e05048f577bb1d26f0..0ae4bbf7779c8bed1602d90898a2f30751eba50b 100644 --- a/arch/s390/include/asm/stacktrace.h +++ b/arch/s390/include/asm/stacktrace.h @@ -30,7 +30,7 @@ static inline bool on_stack(struct stack_info *info, return false; if (addr + len < addr) return false; - return addr >= info->begin && addr + len < info->end; + return addr >= info->begin && addr + len <= info->end; } static inline unsigned long get_stack_pointer(struct task_struct *task, diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 91ce03fd0c84c9544e8555621c175559cbbc6519..df75d574246dc3c39f3ce43ae1b1d1052eea8874 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c @@ -83,7 +83,6 @@ 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 enum fault_type get_fault_type(struct pt_regs *regs) { @@ -108,6 +107,10 @@ static 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; }