diff options
author | 2009-06-09 20:07:59 +0000 | |
---|---|---|
committer | 2009-06-09 20:07:59 +0000 | |
commit | 8c8717cf0cc58d819c5996bbf1ba897702c19ec7 (patch) | |
tree | 34651d712f32962f07827d93e63d9a202b9a75d9 | |
parent | Fix userland regression tests by providing a #define for pool_setipl() (diff) | |
download | wireguard-openbsd-8c8717cf0cc58d819c5996bbf1ba897702c19ec7.tar.xz wireguard-openbsd-8c8717cf0cc58d819c5996bbf1ba897702c19ec7.zip |
correct loop in debug code to not use an uninitialised page. it was
ass-backwards.
afaik this was found by the LLVM CLang static analyser.
ok ariane@ a couple of days ago.
-rw-r--r-- | sys/uvm/uvm_map.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/uvm/uvm_map.c b/sys/uvm/uvm_map.c index 70e60fd2b56..ed2484a4555 100644 --- a/sys/uvm/uvm_map.c +++ b/sys/uvm/uvm_map.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_map.c,v 1.113 2009/06/06 17:46:44 art Exp $ */ +/* $OpenBSD: uvm_map.c,v 1.114 2009/06/09 20:07:59 oga Exp $ */ /* $NetBSD: uvm_map.c,v 1.86 2000/11/27 08:40:03 chs Exp $ */ /* @@ -3834,10 +3834,8 @@ static const char page_flagbits[] = "\31PMAP1\32PMAP2\33PMAP3"; void -uvm_page_printit(pg, full, pr) - struct vm_page *pg; - boolean_t full; - int (*pr)(const char *, ...); +uvm_page_printit(struct vm_page *pg, boolean_t full, + int (*pr)(const char *, ...)) { struct vm_page *tpg; struct uvm_object *uobj; @@ -3874,7 +3872,7 @@ uvm_page_printit(pg, full, pr) uobj = pg->uobject; if (uobj) { (*pr)(" checking object list\n"); - RB_FOREACH(pg, uobj_pgs, &uobj->memt) { + RB_FOREACH(tpg, uobj_pgs, &uobj->memt) { if (tpg == pg) { break; } |