Skip to content

Instantly share code, notes, and snippets.

@gromero
Last active January 20, 2016 18:24
Show Gist options
  • Save gromero/98997e8a14535450a8c6 to your computer and use it in GitHub Desktop.
Save gromero/98997e8a14535450a8c6 to your computer and use it in GitHub Desktop.
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index a67c6d7..6954971 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -431,8 +431,10 @@ good_area:
*/
fault = handle_mm_fault(mm, vma, address, flags);
if (unlikely(fault & (VM_FAULT_RETRY|VM_FAULT_ERROR))) {
- if (fault & VM_FAULT_SIGSEGV)
+ if (fault & VM_FAULT_SIGSEGV) {
+ code = SEGV_MAPERR;
goto bad_area;
+ }
rc = mm_fault_error(regs, address, fault);
if (rc >= MM_FAULT_RETURN)
goto bail;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment