Restore a check unintentionally dropped in r362361.

MFC with:	r362361
This commit is contained in:
Mark Johnston 2020-06-19 04:18:20 +00:00
parent 73a8c90026
commit f034074034
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=362363

View File

@ -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);
/*