svn commit: r267956 - stable/10/sys/vm

Konstantin Belousov kib at FreeBSD.org
Fri Jun 27 11:42:52 UTC 2014


Author: kib
Date: Fri Jun 27 11:42:51 2014
New Revision: 267956
URL: http://svnweb.freebsd.org/changeset/base/267956

Log:
  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.

Modified:
  stable/10/sys/vm/vm_map.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/vm/vm_map.c
==============================================================================
--- stable/10/sys/vm/vm_map.c	Fri Jun 27 10:24:36 2014	(r267955)
+++ stable/10/sys/vm/vm_map.c	Fri Jun 27 11:42:51 2014	(r267956)
@@ -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;


More information about the svn-src-all mailing list