Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11372
b: refs/heads/master
c: 8f5cd76
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Oct 30, 2005
1 parent 0bd12ba commit 71b0dcf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a7e4705b24e611574e5c23105005ffdff694fd58
refs/heads/master: 8f5cd76c185a4c8aeb5fe1e560e3612bfc050c35
8 changes: 5 additions & 3 deletions trunk/arch/um/kernel/process_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ void *um_virt_to_phys(struct task_struct *task, unsigned long addr,
pud_t *pud;
pmd_t *pmd;
pte_t *pte;
pte_t ptent;

if(task->mm == NULL)
return(ERR_PTR(-EINVAL));
Expand All @@ -238,12 +239,13 @@ void *um_virt_to_phys(struct task_struct *task, unsigned long addr,
return(ERR_PTR(-EINVAL));

pte = pte_offset_kernel(pmd, addr);
if(!pte_present(*pte))
ptent = *pte;
if(!pte_present(ptent))
return(ERR_PTR(-EINVAL));

if(pte_out != NULL)
*pte_out = *pte;
return((void *) (pte_val(*pte) & PAGE_MASK) + (addr & ~PAGE_MASK));
*pte_out = ptent;
return((void *) (pte_val(ptent) & PAGE_MASK) + (addr & ~PAGE_MASK));
}

char *current_cmd(void)
Expand Down

0 comments on commit 71b0dcf

Please sign in to comment.