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 <aneesh.kumar@linux.vnet.ibm.com>
Reviewed-by: Balbir Singh <bsingharora@gmail.com>
Reviewed-by: Ian Munsie <imunsie@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
Aneesh Kumar K.V 2016-11-15 20:36:06 +05:30 committed by Michael Ellerman
parent 6654c9368a
commit 64168f4296

View File

@ -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;