Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106633
b: refs/heads/master
c: 53cdb27
h: refs/heads/master
i:
  106631: 561bf81
v: v3
  • Loading branch information
Russell King authored and Russell King committed Jul 27, 2008
1 parent fd8f7ac commit bb719b8
Show file tree
Hide file tree
Showing 2 changed files with 8 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: daf93dd55c48b65ab2f1907e0fc5ef994896c787
refs/heads/master: 53cdb27a933e4032934cbda0b447cfc9943c0eac
10 changes: 7 additions & 3 deletions trunk/arch/arm/mm/fault-armv.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address)
pgd_t *pgd;
pmd_t *pmd;
pte_t *pte, entry;
int ret = 0;
int ret;

pgd = pgd_offset(vma->vm_mm, address);
if (pgd_none(*pgd))
Expand All @@ -54,16 +54,20 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address)
pte = pte_offset_map(pmd, address);
entry = *pte;

/*
* If this page is present, it's actually being shared.
*/
ret = pte_present(entry);

/*
* If this page isn't present, or is already setup to
* fault (ie, is old), we can safely ignore any issues.
*/
if (pte_present(entry) && pte_val(entry) & shared_pte_mask) {
if (ret && pte_val(entry) & shared_pte_mask) {
flush_cache_page(vma, address, pte_pfn(entry));
pte_val(entry) &= ~shared_pte_mask;
set_pte_at(vma->vm_mm, address, pte, entry);
flush_tlb_page(vma, address);
ret = 1;
}
pte_unmap(pte);
return ret;
Expand Down

0 comments on commit bb719b8

Please sign in to comment.