diff options
author | 2011-07-18 16:48:26 +0000 | |
---|---|---|
committer | 2011-07-18 16:48:26 +0000 | |
commit | 71d4e2aa5f62a3bbad1c3cf9357416cdfc3e8493 (patch) | |
tree | deb80d9026a7c5989710a8b76e33b6416c310666 /sys/kern/subr_hibernate.c | |
parent | Wording fixes and remove refrences to vnode_if.src as it's gone; (diff) | |
download | wireguard-openbsd-71d4e2aa5f62a3bbad1c3cf9357416cdfc3e8493.tar.xz wireguard-openbsd-71d4e2aa5f62a3bbad1c3cf9357416cdfc3e8493.zip |
Fix uvm_pmr_alloc_piglet.
A wrong check could cause the piglet allocator to attempt to extract memory
from a range in which the alignment caused it not to fit.
Diffstat (limited to 'sys/kern/subr_hibernate.c')
-rw-r--r-- | sys/kern/subr_hibernate.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/kern/subr_hibernate.c b/sys/kern/subr_hibernate.c index 9e7b737c993..62843f6871f 100644 --- a/sys/kern/subr_hibernate.c +++ b/sys/kern/subr_hibernate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_hibernate.c,v 1.13 2011/07/11 03:30:32 mlarkin Exp $ */ +/* $OpenBSD: subr_hibernate.c,v 1.14 2011/07/18 16:48:26 ariane Exp $ */ /* * Copyright (c) 2011 Ariane van der Steldt <ariane@stack.nl> @@ -435,10 +435,6 @@ retry: pg_addr = VM_PAGE_TO_PHYS(pig_pg); piglet_addr = (pg_addr + (align - 1)) & ~(align - 1); - if (pig_pg->fpgsz >= sz) { - goto found; - } - if (atop(pg_addr) + pig_pg->fpgsz > atop(piglet_addr) + sz) { goto found; |