--- arch/x86/mm/fault.c
+++ arch/x86/mm/fault.c
@@ -830,13 +830,6 @@ mm_fault_error(struct pt_regs *regs, uns
unsigned long address, unsigned int fault)
{
if (fault & VM_FAULT_OOM) {
- /* Kernel mode? Handle exceptions or die: */
- if (!(error_code & PF_USER)) {
- up_read(¤t->mm->mmap_sem);
- no_context(regs, error_code, address);
- return;
- }
-
out_of_memory(regs, error_code, address);
} else {
if (fault & (VM_FAULT_SIGBUS|VM_FAULT_HWPOISON))