mirror of https://gitee.com/openkylin/linux.git
powerpc fixes for 4.15 #6
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. -----BEGIN PGP SIGNATURE----- iQIwBAABCAAaBQJaULvEExxtcGVAZWxsZXJtYW4uaWQuYXUACgkQUevqPMjhpYBN hw//W6NeKl1iS7Xf5tcFX97I/TBakl0rS7gHGBMheQT4IGengQ3dJqfCMdq6nfyx Sss72UG1sVfeYNG5djJjoZ3hmnt1CjcMkRlQotUhFYACufHYiI8DwYlUTNYpQR6f z6uaItK2S5JWSzuk8wOe/VUmBqyIfe+LIWplh8uGy1vn93avbyHrJAAtPFeSyiBm TA6EMubY4n1NpNWyGIWBILO7e1yI0xT4jctwNy/ZAGC0lgutFb4sWY/ZxgYlQyKo fxb0Al8REpY73IjbZbSzcZ1GfdzDztda1fCNyUeKShRInSJTp31zasn4YCXzYOU8 8yLw5DcnlA9Fyy7BV0IuFtAfV4wUHS9NDe8ebX6xKXarurTCwugoSbmHCQ8E7jIC 4FFVhArQdraY+tumOwouJA7g4nGUtGV6rpZAUnd++7xVvFspJiAbFpbU2vUNnnJ4 VoU2lvWjox9r6wxT001Ct/4M+XoR8+nnEKs8bll1771CyV+AQ4fGqoDga3dOB2cC M1ejwLFZ80ZnXDUY6wc4Wzor3G1knVRzuRLEcsoAe4vJunGsS1i9tYce9bOJ9la+ okcmoPm0roPJSiT1bmiptIAsJRjZZq2cxr2+lBBQ9zlNuZyEIY/CwrBM/0ZP6RJI ljbjOCj0xvJBkmIBSenOVO/tIBi/Ww+wL2MDzsYv+K1pp24= =VAzk -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
3219e264b9
|
@ -145,6 +145,11 @@ static noinline int bad_area(struct pt_regs *regs, unsigned long address)
|
||||||
return __bad_area(regs, address, SEGV_MAPERR);
|
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,
|
static int do_sigbus(struct pt_regs *regs, unsigned long address,
|
||||||
unsigned int fault)
|
unsigned int fault)
|
||||||
{
|
{
|
||||||
|
@ -490,7 +495,7 @@ static int __do_page_fault(struct pt_regs *regs, unsigned long address,
|
||||||
|
|
||||||
good_area:
|
good_area:
|
||||||
if (unlikely(access_error(is_write, is_exec, vma)))
|
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,
|
* If for any reason at all we couldn't handle the fault,
|
||||||
|
|
Loading…
Reference in New Issue