Date: Sun, 23 Sep 2012 17:42:39 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r240862 - head/sys/vm Message-ID: <201209231742.q8NHgdDl045511@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Sun Sep 23 17:42:39 2012 New Revision: 240862 URL: http://svn.freebsd.org/changeset/base/240862 Log: Address a race condition that was introduced in r238212. Unless the page queues lock is acquired before the page lock is released, there is no guarantee that the page will still be in that same page queue when vm_page_requeue() is called. Reported by: pho In collaboration with: kib MFC after: 3 days Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sun Sep 23 17:36:01 2012 (r240861) +++ head/sys/vm/vm_pageout.c Sun Sep 23 17:42:39 2012 (r240862) @@ -1125,9 +1125,9 @@ vm_pageout_scan(int pass) * Those objects are in a "rundown" state. */ if (!swap_pageouts_ok || (object->flags & OBJ_DEAD)) { + vm_page_lock_queues(); vm_page_unlock(m); VM_OBJECT_UNLOCK(object); - vm_page_lock_queues(); queues_locked = TRUE; vm_page_requeue(m); goto relock_queues;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209231742.q8NHgdDl045511>