Date: Thu, 15 Oct 2015 19:07:38 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289377 - head/sys/vm Message-ID: <201510151907.t9FJ7cnK002252@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Thu Oct 15 19:07:38 2015 New Revision: 289377 URL: https://svnweb.freebsd.org/changeset/base/289377 Log: Revert r289302, invalid pages can be queued, e.g. by vfs_vmio_unwire(). Found by: alc Tested by: pho Sponsored by: The FreeBSD Foundation Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Thu Oct 15 19:00:33 2015 (r289376) +++ head/sys/vm/vm_pageout.c Thu Oct 15 19:07:38 2015 (r289377) @@ -1174,12 +1174,11 @@ unlock_page: queues_locked = FALSE; /* - * Invalid pages cannot appear on a queue. If - * vm_pageout_fallback_object_lock() allowed a window - * where the page could be invalidated, it should - * detect this. + * Invalid pages can be easily freed. They cannot be + * mapped, vm_page_free() asserts this. */ - KASSERT(m->valid != 0, ("Invalid page %p on inact queue", m)); + if (m->valid == 0) + goto free_page; /* * If the page has been referenced and the object is not dead, @@ -1232,6 +1231,7 @@ unlock_page: /* * Clean pages can be freed. */ +free_page: vm_page_free(m); PCPU_INC(cnt.v_dfree); --page_shortage;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510151907.t9FJ7cnK002252>