kernel: fix assert condition after a caught in-kernel pagefault
This commit is contained in:
parent
a0eaaa5c9f
commit
a6e357da22
1 changed files with 4 additions and 3 deletions
|
@ -832,7 +832,7 @@ int vmcheck; /* if nonzero, can return VMSUSPEND */
|
||||||
|
|
||||||
if((r=lin_lin_copy(procs[_SRC_], phys_addr[_SRC_],
|
if((r=lin_lin_copy(procs[_SRC_], phys_addr[_SRC_],
|
||||||
procs[_DST_], phys_addr[_DST_], bytes)) != OK) {
|
procs[_DST_], phys_addr[_DST_], bytes)) != OK) {
|
||||||
struct proc *target;
|
struct proc *target = NULL;
|
||||||
phys_bytes lin;
|
phys_bytes lin;
|
||||||
if(r != EFAULT_SRC && r != EFAULT_DST)
|
if(r != EFAULT_SRC && r != EFAULT_DST)
|
||||||
panic("lin_lin_copy failed: %d", r);
|
panic("lin_lin_copy failed: %d", r);
|
||||||
|
@ -840,8 +840,6 @@ int vmcheck; /* if nonzero, can return VMSUSPEND */
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(procs[_SRC_] && procs[_DST_]);
|
|
||||||
|
|
||||||
if(r == EFAULT_SRC) {
|
if(r == EFAULT_SRC) {
|
||||||
lin = phys_addr[_SRC_];
|
lin = phys_addr[_SRC_];
|
||||||
target = procs[_SRC_];
|
target = procs[_SRC_];
|
||||||
|
@ -852,6 +850,9 @@ int vmcheck; /* if nonzero, can return VMSUSPEND */
|
||||||
panic("r strange: %d", r);
|
panic("r strange: %d", r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(caller);
|
||||||
|
assert(target);
|
||||||
|
|
||||||
vm_suspend(caller, target, lin, bytes, VMSTYPE_KERNELCALL);
|
vm_suspend(caller, target, lin, bytes, VMSTYPE_KERNELCALL);
|
||||||
return VMSUSPEND;
|
return VMSUSPEND;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue