]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
[PPC64] Fix wrong KASSERT in mphyp_pte_insert()
authorLeandro Lupori <luporl@FreeBSD.org>
Tue, 23 Apr 2019 17:11:45 +0000 (17:11 +0000)
committerLeandro Lupori <luporl@FreeBSD.org>
Tue, 23 Apr 2019 17:11:45 +0000 (17:11 +0000)
commit892004367486a6cc0753481a2551b5a518894e53
tree2757528de6c07e6a4ab7963d429f54b9a3e1dfdb
parenta9f7f192422c95997d8230c26cdd4b679ae7fa78
[PPC64] Fix wrong KASSERT in mphyp_pte_insert()

As mphyp_pte_unset() can also remove PTE entries, and as this can
happen in parallel with PTEs evicted by mphyp_pte_insert(), there
is a (rare) chance the PTE being evicted gets removed before
mphyp_pte_insert() is able to do so. Thus, the KASSERT should
check wether the result is H_SUCCESS or H_NOT_FOUND, to avoid
panics if the situation described above occurs.

More details about this issue can be found in PR 237470.

PR: 237470
Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D20012
sys/powerpc/pseries/mmu_phyp.c