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

Commit 64168f42 authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Michael Ellerman
Browse files

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: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Reviewed-by: default avatarBalbir Singh <bsingharora@gmail.com>
Reviewed-by: default avatarIan Munsie <imunsie@au1.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 6654c936
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -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);
		pr_debug("%s: invalid region access at %016llx\n", __func__, ea);
		return 1;
		return 1;
	}
	}
	/* Bad address */
	if (!vsid)
		return 1;


	vsid = (vsid << slb_vsid_shift(ssize)) | vsidkey;
	vsid = (vsid << slb_vsid_shift(ssize)) | vsidkey;