Merge branch 'patch-1' of https://github.com/Saarett/xv6-public
This commit is contained in:
commit
0249311675
1 changed files with 3 additions and 1 deletions
4
vm.c
4
vm.c
|
@ -137,8 +137,10 @@ setupkvm(void)
|
||||||
panic("PHYSTOP too high");
|
panic("PHYSTOP too high");
|
||||||
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
|
for(k = kmap; k < &kmap[NELEM(kmap)]; k++)
|
||||||
if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
|
if(mappages(pgdir, k->virt, k->phys_end - k->phys_start,
|
||||||
(uint)k->phys_start, k->perm) < 0)
|
(uint)k->phys_start, k->perm) < 0) {
|
||||||
|
freevm(pgdir);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
return pgdir;
|
return pgdir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue