Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3219e264 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 65c64d18 ecb101ae
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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 @@ static int __do_page_fault(struct pt_regs *regs, unsigned long address,

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,