Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80534
b: refs/heads/master
c: 6eade8f
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Jan 30, 2008
1 parent c6c1a81 commit 78a3e6c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 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: 4692a1450b4d1000a942022b088c8791749dd65e
refs/heads/master: 6eade8ff461fdf13ec6780602eb5618e0bdaa972
17 changes: 9 additions & 8 deletions trunk/arch/x86/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,10 @@ static int change_page_attr_set(unsigned long addr, int numpages,
for (i = 0; i < numpages ; i++) {

pte = lookup_address(addr, &level);
if (pte)
current_prot = pte_pgprot(*pte);
else
pgprot_val(current_prot) = 0;
if (!pte)
return -EINVAL;

current_prot = pte_pgprot(*pte);

pgprot_val(new_prot) =
pgprot_val(current_prot) | pgprot_val(prot);
Expand Down Expand Up @@ -356,11 +356,12 @@ static int change_page_attr_clear(unsigned long addr, int numpages,
int i, ret;

for (i = 0; i < numpages; i++) {

pte = lookup_address(addr, &level);
if (pte)
current_prot = pte_pgprot(*pte);
else
pgprot_val(current_prot) = 0;
if (!pte)
return -EINVAL;

current_prot = pte_pgprot(*pte);

pgprot_val(new_prot) =
pgprot_val(current_prot) & ~pgprot_val(prot);
Expand Down

0 comments on commit 78a3e6c

Please sign in to comment.