From: Aneesh Kumar K.V Date: Tue, 15 Nov 2016 15:06:06 +0000 (+0530) Subject: powerpc/mm/coproc: Handle bad address on coproc slb fault X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=64168f4296fa507ba059307984cddcf957a81d5f;p=linux-beck.git powerpc/mm/coproc: Handle bad address on coproc slb fault VSID 0 is bad address. Don't create slb entries on coproc fault for bad address Signed-off-by: Aneesh Kumar K.V Reviewed-by: Balbir Singh Reviewed-by: Ian Munsie Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/mm/copro_fault.c b/arch/powerpc/mm/copro_fault.c index 362954f98029..aaa7ec6788b9 100644 --- a/arch/powerpc/mm/copro_fault.c +++ b/arch/powerpc/mm/copro_fault.c @@ -134,6 +134,9 @@ int copro_calculate_slb(struct mm_struct *mm, u64 ea, struct copro_slb *slb) pr_debug("%s: invalid region access at %016llx\n", __func__, ea); return 1; } + /* Bad address */ + if (!vsid) + return 1; vsid = (vsid << slb_vsid_shift(ssize)) | vsidkey;