From fc9bbf27949858affd0fc6b84d1ca4a16a6b0340 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 13 Aug 2016 18:10:32 +0000 Subject: [PATCH] Eliminate two calls to vm_page_xunbusy() that are both unnecessary and incorrect from the error cases in exec_map_first_page(). They are unnecessary because we automatically unbusy the page in vm_page_free() when we remove it from the object. The calls are incorrect because they happen after the page is freed, so we might actually unbusy the page after it has been reallocated to a different object. (This error was introduced in r292373.) Reviewed by: kib MFC after: 1 week --- sys/kern/kern_exec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index df8e903e9fb..3873c5a8f1d 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -990,7 +990,6 @@ exec_map_first_page(imgp) vm_page_lock(ma[0]); vm_page_free(ma[0]); vm_page_unlock(ma[0]); - vm_page_xunbusy(ma[0]); VM_OBJECT_WUNLOCK(object); return (EIO); } @@ -1018,7 +1017,6 @@ exec_map_first_page(imgp) vm_page_lock(ma[i]); vm_page_free(ma[i]); vm_page_unlock(ma[i]); - vm_page_xunbusy(ma[i]); } VM_OBJECT_WUNLOCK(object); return (EIO);