Date: Mon, 10 Apr 2017 20:55:42 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316686 - head/sys/vm Message-ID: <201704102055.v3AKtg4h040137@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Mon Apr 10 20:55:42 2017 New Revision: 316686 URL: https://svnweb.freebsd.org/changeset/base/316686 Log: Add some bounds assertions to the vm_map_entry clip functions. Reviewed by: kib MFC after: 1 week Sponsored by: Dell EMC Isilon X-Differential Revision: https://reviews.freebsd.org/D10349 Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Mon Apr 10 19:22:15 2017 (r316685) +++ head/sys/vm/vm_map.c Mon Apr 10 20:55:42 2017 (r316686) @@ -1655,6 +1655,8 @@ _vm_map_clip_start(vm_map_t map, vm_map_ vm_map_entry_t new_entry; VM_MAP_ASSERT_LOCKED(map); + KASSERT(entry->end > start && entry->start < start, + ("_vm_map_clip_start: invalid clip of entry %p", entry)); /* * Split off the front portion -- note that we must insert the new @@ -1739,6 +1741,8 @@ _vm_map_clip_end(vm_map_t map, vm_map_en vm_map_entry_t new_entry; VM_MAP_ASSERT_LOCKED(map); + KASSERT(entry->start < end && entry->end > end, + ("_vm_map_clip_end: invalid clip of entry %p", entry)); /* * If there is no object backing this entry, we might as well create
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704102055.v3AKtg4h040137>