arm64: Fix double locking when calling FreeTable
Change-Id: I159ccd17ec6c06d759e856f5397bf00a7473d1e0 Reviewed-on: https://review.haiku-os.org/c/haiku/+/8436 Tested-by: Commit checker robot <[email protected]> Haiku-Format: Haiku-format Bot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
f597685760
commit
17c50417f8
@@ -139,20 +139,17 @@ VMSAv8TranslationMap::~VMSAv8TranslationMap()
|
|||||||
|
|
||||||
ASSERT(!fIsKernel);
|
ASSERT(!fIsKernel);
|
||||||
ASSERT(fRefcount == 0);
|
ASSERT(fRefcount == 0);
|
||||||
{
|
|
||||||
ThreadCPUPinner pinner(thread_get_current_thread());
|
|
||||||
FreeTable(fPageTable, 0, fInitialLevel);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
ThreadCPUPinner pinner(thread_get_current_thread());
|
||||||
InterruptsSpinLocker locker(sAsidLock);
|
InterruptsSpinLocker locker(sAsidLock);
|
||||||
|
|
||||||
|
FreeTable(fPageTable, 0, fInitialLevel);
|
||||||
|
|
||||||
if (fASID != -1) {
|
if (fASID != -1) {
|
||||||
sAsidMapping[fASID] = NULL;
|
sAsidMapping[fASID] = NULL;
|
||||||
free_asid(fASID);
|
free_asid(fASID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Switch user map into TTBR0.
|
// Switch user map into TTBR0.
|
||||||
@@ -280,7 +277,6 @@ void
|
|||||||
VMSAv8TranslationMap::FreeTable(phys_addr_t ptPa, uint64_t va, int level)
|
VMSAv8TranslationMap::FreeTable(phys_addr_t ptPa, uint64_t va, int level)
|
||||||
{
|
{
|
||||||
ASSERT(level < 4);
|
ASSERT(level < 4);
|
||||||
InterruptsSpinLocker locker(sAsidLock);
|
|
||||||
|
|
||||||
int tableBits = fPageBits - 3;
|
int tableBits = fPageBits - 3;
|
||||||
uint64_t tableSize = 1UL << tableBits;
|
uint64_t tableSize = 1UL << tableBits;
|
||||||
|
|||||||
Reference in New Issue
Block a user