]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r204268:
authornwhitehorn <nwhitehorn@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 20 Mar 2010 15:19:57 +0000 (15:19 +0000)
committernwhitehorn <nwhitehorn@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 20 Mar 2010 15:19:57 +0000 (15:19 +0000)
commite9c2f3206d1163e43a2320134a0a82e080e27002
treee73ff98708b50ca74d2ee249bef849511407f601
parenteebaa27e18e10f4f4c54dacc87e6c189704d031b
MFC r204268:

Close a race involving the OEA64 scratchpage. When the scratch page's
physical address is changed, there is a brief window during which its PTE
is invalid. Since moea64_set_scratchpage_pa() does not and cannot hold
the page table lock, it was possible for another CPU to insert a new PTE
into the scratch page's PTEG slot during this interval, corrupting both
mappings.

Solve this by creating a new flag, LPTE_LOCKED, such that
moea64_pte_insert will avoid claiming locked PTEG slots even if they
are invalid. This change also incorporates some additional paranoia
added to solve things I thought might be this bug.

Reported by: linimon

git-svn-id: svn://svn.freebsd.org/base/stable/8@205379 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/powerpc/aim/mmu_oea64.c
sys/powerpc/include/pte.h