aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm/fault_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/mm/fault_64.c')
-rw-r--r--arch/sparc/mm/fault_64.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c
index 5062ff389e83..2ebec263d685 100644
--- a/arch/sparc/mm/fault_64.c
+++ b/arch/sparc/mm/fault_64.c
@@ -315,7 +315,8 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
315 bad_kernel_pc(regs, address); 315 bad_kernel_pc(regs, address);
316 return; 316 return;
317 } 317 }
318 } 318 } else
319 flags |= FAULT_FLAG_USER;
319 320
320 /* 321 /*
321 * If we're in an interrupt or have no user 322 * If we're in an interrupt or have no user
@@ -418,13 +419,14 @@ good_area:
418 vma->vm_file != NULL) 419 vma->vm_file != NULL)
419 set_thread_fault_code(fault_code | 420 set_thread_fault_code(fault_code |
420 FAULT_CODE_BLKCOMMIT); 421 FAULT_CODE_BLKCOMMIT);
422
423 flags |= FAULT_FLAG_WRITE;
421 } else { 424 } else {
422 /* Allow reads even for write-only mappings */ 425 /* Allow reads even for write-only mappings */
423 if (!(vma->vm_flags & (VM_READ | VM_EXEC))) 426 if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
424 goto bad_area; 427 goto bad_area;
425 } 428 }
426 429
427 flags |= ((fault_code & FAULT_CODE_WRITE) ? FAULT_FLAG_WRITE : 0);
428 fault = handle_mm_fault(mm, vma, address, flags); 430 fault = handle_mm_fault(mm, vma, address, flags);
429 431
430 if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) 432 if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))