Date: Sat, 24 Feb 2018 20:12:01 +0000 (UTC) From: Jeff Roberson <jeff@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r329925 - user/jeff/numa/sys/vm Message-ID: <201802242012.w1OKC1dd072648@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jeff Date: Sat Feb 24 20:12:01 2018 New Revision: 329925 URL: https://svnweb.freebsd.org/changeset/base/329925 Log: Acquire the page lock when freeing a page we failed to allocate so that we can properly consult reservations. Reported by: pho Modified: user/jeff/numa/sys/vm/vm_page.c Modified: user/jeff/numa/sys/vm/vm_page.c ============================================================================== --- user/jeff/numa/sys/vm/vm_page.c Sat Feb 24 20:07:39 2018 (r329924) +++ user/jeff/numa/sys/vm/vm_page.c Sat Feb 24 20:12:01 2018 (r329925) @@ -1864,7 +1864,9 @@ found: m->oflags = VPO_UNMANAGED; m->busy_lock = VPB_UNBUSIED; /* Don't change PG_ZERO. */ + vm_page_lock(m); vm_page_free_toq(m); + vm_page_unlock(m); if (req & VM_ALLOC_WAITFAIL) { VM_OBJECT_WUNLOCK(object); vm_radix_wait(); @@ -2066,7 +2068,9 @@ found: m->oflags = VPO_UNMANAGED; m->busy_lock = VPB_UNBUSIED; /* Don't change PG_ZERO. */ + vm_page_lock(m); vm_page_free_toq(m); + vm_page_unlock(m); } if (req & VM_ALLOC_WAITFAIL) { VM_OBJECT_WUNLOCK(object);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802242012.w1OKC1dd072648>