From: Ben Gras Date: Wed, 20 Apr 2011 10:17:08 +0000 (+0000) Subject: kernel: fix logic error in the case vm_lookup fails X-Git-Tag: v3.2.0~573 X-Git-Url: http://zhaoyanbai.com/repos/%22../static/icons/mdoc.3.ps?a=commitdiff_plain;h=2b09bfde6d828040090b4ad2d07f1da99b648c8b;p=minix.git kernel: fix logic error in the case vm_lookup fails --- diff --git a/kernel/arch/i386/memory.c b/kernel/arch/i386/memory.c index 4d7417ae8..49a597193 100644 --- a/kernel/arch/i386/memory.c +++ b/kernel/arch/i386/memory.c @@ -406,9 +406,10 @@ vir_bytes bytes; /* # of bytes to be copied */ if(vm_lookup(rp, linear, &phys, NULL) != OK) { printf("SYSTEM:umap_virtual: vm_lookup of %s: seg 0x%lx: 0x%lx failed\n", rp->p_name, seg, vir_addr); phys = 0; + } else { + if(phys == 0) + panic("vm_lookup returned phys: %d", phys); } - if(phys == 0) - panic("vm_lookup returned phys: %d", phys); }