diff options
author | kib <kib@FreeBSD.org> | 2014-06-27 11:42:51 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-06-27 11:42:51 +0000 |
commit | 4dd240dde070d23287ceb79acd8bc4c76a1ac96b (patch) | |
tree | daa5e6f87da793871494b92111b760ab498a6106 /sys | |
parent | b39fb82c62c0b0c34a7bc0f9cdc4c8b8c53e321d (diff) | |
download | FreeBSD-src-4dd240dde070d23287ceb79acd8bc4c76a1ac96b.zip FreeBSD-src-4dd240dde070d23287ceb79acd8bc4c76a1ac96b.tar.gz |
MFC r267664:
Assert that the new entry is inserted into the right location in the
map entries list, and that it does not overlap with the previous and
next entries.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/vm/vm_map.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 62785f1..0713af8 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -940,6 +940,15 @@ vm_map_entry_link(vm_map_t map, "vm_map_entry_link: map %p, nentries %d, entry %p, after %p", map, map->nentries, entry, after_where); VM_MAP_ASSERT_LOCKED(map); + KASSERT(after_where == &map->header || + after_where->end <= entry->start, + ("vm_map_entry_link: prev end %jx new start %jx overlap", + (uintmax_t)after_where->end, (uintmax_t)entry->start)); + KASSERT(after_where->next == &map->header || + entry->end <= after_where->next->start, + ("vm_map_entry_link: new end %jx next start %jx overlap", + (uintmax_t)entry->end, (uintmax_t)after_where->next->start)); + map->nentries++; entry->prev = after_where; entry->next = after_where->next; |