From eb31f1bc1d1597a890afb9af32d96bed1709f4ca Mon Sep 17 00:00:00 2001 From: Michel Lespinasse Date: Tue, 26 Oct 2010 14:21:58 -0700 Subject: [PATCH] --- yaml --- r: 217474 b: refs/heads/master c: 68da336a14e16c2de95e987f3200995b707d7038 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/mm/fault.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 481b85bfd32d..4a772bcf94ae 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d065bd810b6deb67d4897a14bfe21f8eb526ba99 +refs/heads/master: 68da336a14e16c2de95e987f3200995b707d7038 diff --git a/trunk/arch/x86/mm/fault.c b/trunk/arch/x86/mm/fault.c index 9b2345c9e0c3..7d90ceb882a4 100644 --- a/trunk/arch/x86/mm/fault.c +++ b/trunk/arch/x86/mm/fault.c @@ -919,9 +919,9 @@ spurious_fault(unsigned long error_code, unsigned long address) int show_unhandled_signals = 1; static inline int -access_error(unsigned long error_code, int write, struct vm_area_struct *vma) +access_error(unsigned long error_code, struct vm_area_struct *vma) { - if (write) { + if (error_code & PF_WRITE) { /* write, present and write, not present: */ if (unlikely(!(vma->vm_flags & VM_WRITE))) return 1; @@ -1114,7 +1114,7 @@ do_page_fault(struct pt_regs *regs, unsigned long error_code) * we can handle it.. */ good_area: - if (unlikely(access_error(error_code, write, vma))) { + if (unlikely(access_error(error_code, vma))) { bad_area_access_error(regs, error_code, address); return; }