summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-01-06 09:48:27 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-01-06 09:48:27 -0800
commit3219e264b984ec0a13923aa66385819c2e98d582 (patch)
tree4d344c40928cadce611504a439f33473338984a7 /arch/powerpc
parent65c64d1845fbc6420f8836e8731ea6c3012e8e7d (diff)
parentecb101aed86156ec7cd71e5dca668e09146e6994 (diff)
downloadlinux-stable-3219e264b984ec0a13923aa66385819c2e98d582.tar.gz
linux-stable-3219e264b984ec0a13923aa66385819c2e98d582.tar.bz2
linux-stable-3219e264b984ec0a13923aa66385819c2e98d582.zip
Merge tag 'powerpc-4.15-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fix from Michael Ellerman: "Just one fix to correctly return SEGV_ACCERR when we take a SEGV on a mapped region. The bug was introduced in the refactoring of the page fault handler we did in the previous release. Thanks to John Sperbeck" * tag 'powerpc-4.15-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/mm: Fix SEGV on mapped region to return SEGV_ACCERR
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/mm/fault.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index 4797d08581ce..6e1e39035380 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -145,6 +145,11 @@ static noinline int bad_area(struct pt_regs *regs, unsigned long address)
return __bad_area(regs, address, SEGV_MAPERR);
}
+static noinline int bad_access(struct pt_regs *regs, unsigned long address)
+{
+ return __bad_area(regs, address, SEGV_ACCERR);
+}
+
static int do_sigbus(struct pt_regs *regs, unsigned long address,
unsigned int fault)
{
@@ -490,7 +495,7 @@ retry:
good_area:
if (unlikely(access_error(is_write, is_exec, vma)))
- return bad_area(regs, address);
+ return bad_access(regs, address);
/*
* If for any reason at all we couldn't handle the fault,