Handle zero length in copyout_unmap().

Submitted by:	John Wehle <john feith com>
MFC after:	2 weeks
This commit is contained in:
kib 2011-03-28 13:21:26 +00:00
parent 7b58e8da9b
commit 52182b9c4a

View File

@ -498,6 +498,9 @@ copyout_unmap(struct thread *td, vm_offset_t addr, size_t sz)
vm_map_t map;
vm_size_t size;
if (sz == 0)
return (0);
map = &td->td_proc->p_vmspace->vm_map;
size = (vm_size_t) round_page(sz);