aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r--arch/x86/mm/fault.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 7d90ceb882a..ffc7be104fc 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -828,6 +828,13 @@ mm_fault_error(struct pt_regs *regs, unsigned long error_code,
828 unsigned long address, unsigned int fault) 828 unsigned long address, unsigned int fault)
829{ 829{
830 if (fault & VM_FAULT_OOM) { 830 if (fault & VM_FAULT_OOM) {
831 /* Kernel mode? Handle exceptions or die: */
832 if (!(error_code & PF_USER)) {
833 up_read(&current->mm->mmap_sem);
834 no_context(regs, error_code, address);
835 return;
836 }
837
831 out_of_memory(regs, error_code, address); 838 out_of_memory(regs, error_code, address);
832 } else { 839 } else {
833 if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON| 840 if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON|