]> Zhao Yanbai Git Server - minix.git/commitdiff
kernel: fix logic error in the case vm_lookup fails
authorBen Gras <ben@minix3.org>
Wed, 20 Apr 2011 10:17:08 +0000 (10:17 +0000)
committerBen Gras <ben@minix3.org>
Wed, 20 Apr 2011 10:17:08 +0000 (10:17 +0000)
kernel/arch/i386/memory.c

index 4d7417ae88a9b7c41f9daca2c3b92b61fa16e7a7..49a5971931b71c7d8e471c820a9115605aeafa64 100644 (file)
@@ -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);
                }