[NTOS:MM] Do not use atomic operations to set a bit while holding a lock.

Saving your fingers from typing it doesn't make it better code.
This commit is contained in:
Jérôme Gardou 2021-03-18 09:05:00 +01:00 committed by Jérôme Gardou
parent f06b58925d
commit 8494688eeb

View file

@ -1734,7 +1734,7 @@ ExpFindAndRemoveTagBigPages(IN PVOID Va,
// Set the free bit, and decrement the number of allocations. Finally, release
// the lock and return the tag that was located
//
InterlockedIncrement((PLONG)&Entry->Va);
Entry->Va = (PVOID)((ULONG_PTR)Entry->Va | POOL_BIG_TABLE_ENTRY_FREE);
ExpPoolBigEntriesInUse--;