[scudo] Re-check freelist before populating blocks in popBlocksWithCV (#231750)

In popBlocksWithCV, the region freelist may become non-empty before the
thread calls populateFreeListAndPopBlocks. This can happen in two
scenarios:

1. Another thread may push blocks or finish
populateFreeListAndPopBlocks() in the window between releasing FLLock in
popBlocks() and reacquiring it in popBlocksWithCV().

2. releaseToOSMaybe() holds MMLock while temporarily extracting
GroupsToRelease with FLLock unlocked, and merges those groups back into
BlockList before releasing MMLock.

When this does happen, popBlocksWithCV unconditionally calls
populateFreeListAndPopBlocks, permanently growing the region mapping and
BatchClassId freelist metadata.

The fix here is to re-check popBlocksImpl() under FLLock before setting
IsPopulatingFreeList and after acquiring MMLock, so existing free blocks
are reused.

Assisted-by: Gemini

Signed-off-by: David Anderson <dvander@google.com>
GitOrigin-RevId: c6b016f0f11bd8f41b2ef596ff6a89ab5f2310d4
2 files changed