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) {
vm_print(cr3);
vm_print(ptproc->p_seg.p_cr3);
}
- unlock;
+ if(u) {
+ unlock;
+ }
}
test_eip = k_reenter ? old_eip : pr->p_reg.pc;
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))
{
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.
*