diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2025-12-20 16:03:40 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2025-12-30 03:25:36 +0000 |
| commit | 7685aaea8850f5b6995a17740a016019e0956c70 (patch) | |
| tree | 2d1c1079d125c066b658b1bc59db8f403fffe26f /test/asan | |
| parent | 353ba3bf08fdef69b77e3e565435e50784a51412 (diff) | |
It is possible for both vm_map_insert() and vm_object_coalesce() to charge
both for the same region. The issue is that vm_map_insert() must charge
in advance to ensure that the mapping would not exceed the swap limit,
but then the coalesce might decide to extend the object, and already
(partially) backs the mapped region.
Handle this by passing to vm_object_coalesce() exact information about
the charging mode of the extending range 'not charging', 'charged' using
flags instead of simple boolean. In vm_object_coalesce(), detect
overcharge and undo it if needed.
Note that this relies on vm_object_coalesce() call being the last action
in vm_map_insert() before extending the previous map entry.
Reported and tested by: pho
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54338
Diffstat (limited to 'test/asan')
0 files changed, 0 insertions, 0 deletions
