summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2010-06-03 18:34:34 +0000
committerkib <kib@FreeBSD.org>2010-06-03 18:34:34 +0000
commit06a4e12f9399a28f5c8bed2b33bcd7acab47f7db (patch)
treeacaaee2721d7a7e3f8fccea16b42d946bf0bbda3 /sys/vm
parent294b044a4b441c5212b83604fc5a265e225671cc (diff)
downloadFreeBSD-src-06a4e12f9399a28f5c8bed2b33bcd7acab47f7db.zip
FreeBSD-src-06a4e12f9399a28f5c8bed2b33bcd7acab47f7db.tar.gz
Do not leak vm page lock in vm_contig_launder(), vm_pageout_page_lock()
always returns with the page locked. Submitted by: alc Pointy hat to: kib
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_contig.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/vm/vm_contig.c b/sys/vm/vm_contig.c
index 4d896a3..025031e 100644
--- a/sys/vm/vm_contig.c
+++ b/sys/vm/vm_contig.c
@@ -168,8 +168,10 @@ vm_contig_launder(int queue)
if ((m->flags & PG_MARKER) != 0)
continue;
- if (!vm_pageout_page_lock(m, &next))
+ if (!vm_pageout_page_lock(m, &next)) {
+ vm_page_unlock(m);
continue;
+ }
KASSERT(VM_PAGE_INQUEUE2(m, queue),
("vm_contig_launder: page %p's queue is not %d", m, queue));
error = vm_contig_launder_page(m, &next);
OpenPOWER on IntegriCloud