diff options
Diffstat (limited to 'sys/uvm/uvm_unix.c')
-rw-r--r-- | sys/uvm/uvm_unix.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/uvm/uvm_unix.c b/sys/uvm/uvm_unix.c index 06cbf871e41..f4d4490b853 100644 --- a/sys/uvm/uvm_unix.c +++ b/sys/uvm/uvm_unix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_unix.c,v 1.42 2011/06/06 17:10:23 ariane Exp $ */ +/* $OpenBSD: uvm_unix.c,v 1.43 2012/03/09 13:01:29 ariane Exp $ */ /* $NetBSD: uvm_unix.c,v 1.18 2000/09/13 15:00:25 thorpej Exp $ */ /* @@ -167,9 +167,7 @@ uvm_coredump(struct proc *p, struct vnode *vp, struct ucred *cred, offset = chdr->c_hdrsize + chdr->c_seghdrsize + chdr->c_cpusize; - for (entry = map->header.next; entry != &map->header; - entry = entry->next) { - + RB_FOREACH(entry, uvm_map_addr, &map->addr) { /* should never happen for a user process */ if (UVM_ET_ISSUBMAP(entry)) { panic("uvm_coredump: user process with submap?"); @@ -261,9 +259,7 @@ uvm_coredump_walkmap(struct proc *p, void *iocookie, vaddr_t top; int error; - for (entry = map->header.next; entry != &map->header; - entry = entry->next) { - + RB_FOREACH(entry, uvm_map_addr, &map->addr) { state.cookie = cookie; state.prot = entry->protection; state.flags = 0; |