Error recovery fixes to mm0 and l4_map_helper

This commit is contained in:
Bahadir Balban
2009-11-18 10:55:53 +02:00
parent 452f177ce2
commit 51a12a507f
2 changed files with 14 additions and 4 deletions

View File

@@ -322,10 +322,16 @@ void *l4_del_virtual(void *virt, int npages);
static inline void *l4_map_helper(void *phys, int npages)
{
struct task_ids ids;
int err;
void *virt = l4_new_virtual(npages);
l4_getid(&ids);
l4_map(phys, virt, npages, MAP_USR_RW_FLAGS, ids.tid);
if ((err = l4_map(phys, virt, npages,
MAP_USR_RW_FLAGS, ids.tid)) < 0)
return PTR_ERR(err);
return virt;
}