Timestamp:
2021-09-03T17:44:29Z (3 years ago)
Author:
Martin Decky <martin@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3c3657c
Parents:
400a16d
Message:

Fix memory corruption caused by merging zones

Originally, the frames in the gap between the two merged zones has not
been marked as unavailable. This caused allocation requests to
potentially land in this gap and thus to memory corruption. Now the
frames in the gap are properly marked.

Use a dedicated function zone_mark_available() to mark old
configuration frames after merging as available. Since the
configuration frames are either marked using zone_mark_unavailable()
(for the original zones created according to the physical memory map)
or the busy count of the configuration frames is explicitly extracted
during the merging, the use of zone_frame_free() caused underflow of
the busy counter.

Add a few useful assertions.

(No files)

Note: See TracChangeset for help on using the changeset viewer.