diff options
Diffstat (limited to 'sys/uvm/uvm_pglist.c')
-rw-r--r-- | sys/uvm/uvm_pglist.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/uvm/uvm_pglist.c b/sys/uvm/uvm_pglist.c index 42ad231fb38..d9ec0cae496 100644 --- a/sys/uvm/uvm_pglist.c +++ b/sys/uvm/uvm_pglist.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_pglist.c,v 1.15 2006/01/16 13:11:06 mickey Exp $ */ +/* $OpenBSD: uvm_pglist.c,v 1.16 2006/06/01 05:16:49 krw Exp $ */ /* $NetBSD: uvm_pglist.c,v 1.13 2001/02/18 21:19:08 chs Exp $ */ /*- @@ -110,6 +110,9 @@ uvm_pglistalloc(size, low, high, alignment, boundary, rlist, nsegs, waitok) if (alignment < PAGE_SIZE) alignment = PAGE_SIZE; + if (size == 0) + return (EINVAL); + size = round_page(size); try = roundup(low, alignment); |