summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2012-09-23 17:42:39 +0000
committeralc <alc@FreeBSD.org>2012-09-23 17:42:39 +0000
commita0349df30f698fa26694aeca2cf25e3745801b81 (patch)
tree5d97e3169aaf7bc0a6aee5aefd906e516e34cb64 /sys/vm
parent586a4f9edeeed03eeb5f5e09020a995e8514d066 (diff)
downloadFreeBSD-src-a0349df30f698fa26694aeca2cf25e3745801b81.zip
FreeBSD-src-a0349df30f698fa26694aeca2cf25e3745801b81.tar.gz
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
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_pageout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
index b606615..d533673 100644
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -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;
OpenPOWER on IntegriCloud