Date: Fri, 20 Jun 2014 07:01:53 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267664 - head/sys/vm Message-ID: <201406200701.s5K71rHC031520@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Jun 20 07:01:53 2014 New Revision: 267664 URL: http://svnweb.freebsd.org/changeset/base/267664 Log: 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. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Fri Jun 20 02:54:04 2014 (r267663) +++ head/sys/vm/vm_map.c Fri Jun 20 07:01:53 2014 (r267664) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406200701.s5K71rHC031520>