Date: Thu, 3 Oct 2019 14:54:27 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r353050 - stable/12/sys/kern Message-ID: <201910031454.x93EsRt2057941@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Thu Oct 3 14:54:26 2019 New Revision: 353050 URL: https://svnweb.freebsd.org/changeset/base/353050 Log: MFC r352748: Fix handling of invalid pages in exec_map_first_page(). Modified: stable/12/sys/kern/kern_exec.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/kern/kern_exec.c ============================================================================== --- stable/12/sys/kern/kern_exec.c Thu Oct 3 14:52:25 2019 (r353049) +++ stable/12/sys/kern/kern_exec.c Thu Oct 3 14:54:26 2019 (r353050) @@ -996,7 +996,10 @@ exec_map_first_page(struct image_params *imgp) vm_page_xbusy(ma[0]); if (!vm_pager_has_page(object, 0, NULL, &after)) { vm_page_lock(ma[0]); - vm_page_free(ma[0]); + if (!vm_page_wired(ma[0])) + vm_page_free(ma[0]); + else + vm_page_xunbusy_maybelocked(ma[0]); vm_page_unlock(ma[0]); VM_OBJECT_WUNLOCK(object); return (EIO); @@ -1023,7 +1026,10 @@ exec_map_first_page(struct image_params *imgp) if (rv != VM_PAGER_OK) { for (i = 0; i < initial_pagein; i++) { vm_page_lock(ma[i]); - vm_page_free(ma[i]); + if (!vm_page_wired(ma[i])) + vm_page_free(ma[i]); + else + vm_page_xunbusy_maybelocked(ma[i]); vm_page_unlock(ma[i]); } VM_OBJECT_WUNLOCK(object);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910031454.x93EsRt2057941>