From owner-svn-src-head@freebsd.org Sat Aug 13 18:10:33 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89525BB87B5; Sat, 13 Aug 2016 18:10:33 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BAEC159F; Sat, 13 Aug 2016 18:10:33 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7DIAWgR089122; Sat, 13 Aug 2016 18:10:32 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7DIAW1i089121; Sat, 13 Aug 2016 18:10:32 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201608131810.u7DIAW1i089121@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Sat, 13 Aug 2016 18:10:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r304050 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Aug 2016 18:10:33 -0000 Author: alc Date: Sat Aug 13 18:10:32 2016 New Revision: 304050 URL: https://svnweb.freebsd.org/changeset/base/304050 Log: 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 Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Sat Aug 13 16:45:14 2016 (r304049) +++ head/sys/kern/kern_exec.c Sat Aug 13 18:10:32 2016 (r304050) @@ -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);