diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-14 08:19:08 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-14 08:19:08 -0400 |
commit | 905ec87e93bc9e01b15c60035cd6a50c636cbaef (patch) | |
tree | 46fd7618d6511611ffc19eb0dd4d7bc6b90a41c2 /arch/um/kernel/trap_kern.c | |
parent | 1d6ae775d7a948c9575658eb41184fd2e506c0df (diff) | |
parent | 2f4ba45a75d6383b4a1201169a808ffea416ffa0 (diff) | |
download | blackbird-op-linux-905ec87e93bc9e01b15c60035cd6a50c636cbaef.tar.gz blackbird-op-linux-905ec87e93bc9e01b15c60035cd6a50c636cbaef.zip |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'arch/um/kernel/trap_kern.c')
-rw-r--r-- | arch/um/kernel/trap_kern.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/um/kernel/trap_kern.c b/arch/um/kernel/trap_kern.c index b5fc89fe9eab..87cc6fd76ced 100644 --- a/arch/um/kernel/trap_kern.c +++ b/arch/um/kernel/trap_kern.c @@ -57,7 +57,8 @@ good_area: if(is_write && !(vma->vm_flags & VM_WRITE)) goto out; - if(!(vma->vm_flags & (VM_READ | VM_EXEC))) + /* Don't require VM_READ|VM_EXEC for write faults! */ + if(!is_write && !(vma->vm_flags & (VM_READ | VM_EXEC))) goto out; do { @@ -84,8 +85,7 @@ survive: pte = pte_offset_kernel(pmd, address); } while(!pte_present(*pte)); err = 0; - *pte = pte_mkyoung(*pte); - if(pte_write(*pte)) *pte = pte_mkdirty(*pte); + WARN_ON(!pte_young(*pte) || (is_write && !pte_dirty(*pte))); flush_tlb_page(vma, address); out: up_read(&mm->mmap_sem); |