kernel: fix issue #62 (vunmap bug) reported from http://9fans.net/archive/2011/06/262
parent
a5717fb10f
commit
402ee30714
|
@ -739,16 +739,13 @@ pdbunmap(ulong *pdb, ulong va, int size)
|
|||
vae = va+size;
|
||||
while(va < vae){
|
||||
table = &pdb[PDX(va)];
|
||||
if(!(*table & PTEVALID)){
|
||||
if(!(*table & PTEVALID))
|
||||
panic("vunmap: not mapped");
|
||||
/*
|
||||
va = (va+4*MB-1) & ~(4*MB-1);
|
||||
continue;
|
||||
*/
|
||||
}
|
||||
if(*table & PTESIZE){
|
||||
if(va & 4*MB-1)
|
||||
panic("vunmap: misaligned: %#p\n", va);
|
||||
*table = 0;
|
||||
va = (va+4*MB-1) & ~(4*MB-1);
|
||||
va += 4*MB;
|
||||
continue;
|
||||
}
|
||||
table = KADDR(PPN(*table));
|
||||
|
|
Loading…
Reference in New Issue