- Return EACCES if we're trying to exec on a vp with no object.

Errno supplied by:	cperciva
This commit is contained in:
Jeff Roberson 2005-05-01 00:58:19 +00:00
parent 7b6b7657d2
commit 4d7d299383
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=145731

View File

@ -791,6 +791,8 @@ exec_map_first_page(imgp)
exec_unmap_first_page(imgp);
object = imgp->vp->v_object;
if (object == NULL)
return (EACCES);
VM_OBJECT_LOCK(object);
ma[0] = vm_page_grab(object, 0, VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
if ((ma[0]->valid & VM_PAGE_BITS_ALL) != VM_PAGE_BITS_ALL) {