allow empty senda
This commit is contained in:
parent
9e72241374
commit
782133423e
@ -44,7 +44,11 @@ void pagefault(vir_bytes old_eip, struct proc *pr, int trap_errno,
|
||||
vmassert(pr->p_seg.p_cr3 == read_cr3());
|
||||
} else {
|
||||
u32_t cr3;
|
||||
lock;
|
||||
int u = 0;
|
||||
if(!intr_disabled()) {
|
||||
lock;
|
||||
u = 1;
|
||||
}
|
||||
cr3 = read_cr3();
|
||||
vmassert(ptproc);
|
||||
if(ptproc->p_seg.p_cr3 != cr3) {
|
||||
@ -58,7 +62,9 @@ void pagefault(vir_bytes old_eip, struct proc *pr, int trap_errno,
|
||||
vm_print(cr3);
|
||||
vm_print(ptproc->p_seg.p_cr3);
|
||||
}
|
||||
unlock;
|
||||
if(u) {
|
||||
unlock;
|
||||
}
|
||||
}
|
||||
|
||||
test_eip = k_reenter ? old_eip : pr->p_reg.pc;
|
||||
|
@ -732,13 +732,6 @@ size_t size;
|
||||
vir_bytes table_v = (vir_bytes) table;
|
||||
vir_bytes linaddr;
|
||||
|
||||
if(!(linaddr = umap_local(caller_ptr, D, (vir_bytes) table,
|
||||
size * sizeof(*table)))) {
|
||||
printf("mini_senda: umap_local failed; 0x%lx len 0x%lx\n",
|
||||
table, size * sizeof(*table));
|
||||
return EFAULT;
|
||||
}
|
||||
|
||||
privp= priv(caller_ptr);
|
||||
if (!(privp->s_flags & SYS_PROC))
|
||||
{
|
||||
@ -757,6 +750,13 @@ size_t size;
|
||||
return OK;
|
||||
}
|
||||
|
||||
if(!(linaddr = umap_local(caller_ptr, D, (vir_bytes) table,
|
||||
size * sizeof(*table)))) {
|
||||
printf("mini_senda: umap_local failed; 0x%lx len 0x%lx\n",
|
||||
table, size * sizeof(*table));
|
||||
return EFAULT;
|
||||
}
|
||||
|
||||
/* Limit size to something reasonable. An arbitrary choice is 16
|
||||
* times the number of process table entries.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user