Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182995
b: refs/heads/master
c: 56dd470
h: refs/heads/master
i:
  182993: 1053491
  182991: c823d7e
v: v3
  • Loading branch information
Russell King committed Jan 20, 2010
1 parent ada1b6d commit 31c83e0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: f8a85f1164a33e3eb5b421b137ced793ed53ee33
refs/heads/master: 56dd47098abe1fdde598a8d8b7c04d775506f456
13 changes: 11 additions & 2 deletions trunk/arch/arm/mm/fault-armv.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ static int do_adjust_pte(struct vm_area_struct *vma, unsigned long address,

static int adjust_pte(struct vm_area_struct *vma, unsigned long address)
{
spinlock_t *ptl;
pgd_t *pgd;
pmd_t *pmd;
pte_t *pte;
Expand All @@ -80,11 +81,19 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address)
if (pmd_none_or_clear_bad(pmd))
return 0;

pte = pte_offset_map(pmd, address);
/*
* This is called while another page table is mapped, so we
* must use the nested version. This also means we need to
* open-code the spin-locking.
*/
ptl = pte_lockptr(vma->vm_mm, pmd);
pte = pte_offset_map_nested(pmd, address);
spin_lock(ptl);

ret = do_adjust_pte(vma, address, pte);

pte_unmap(pte);
spin_unlock(ptl);
pte_unmap_nested(pte);

return ret;
}
Expand Down

0 comments on commit 31c83e0

Please sign in to comment.