From f03407403493fd8e4b3eb38220d5d6dea98d40c5 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Fri, 19 Jun 2020 04:18:20 +0000 Subject: [PATCH] Restore a check unintentionally dropped in r362361. MFC with: r362361 --- sys/vm/vm_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 598c798cf871..f3a261c70d43 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -1616,7 +1616,7 @@ vm_map_insert(vm_map_t map, vm_object_t object, vm_ooffset_t offset, /* * Check that the start and end points are not bogus. */ - if (!vm_map_range_valid(map, start, end)) + if (start == end || !vm_map_range_valid(map, start, end)) return (KERN_INVALID_ADDRESS); /*