From: Russell King Date: Thu, 4 Aug 2005 13:17:33 +0000 (+0100) Subject: [PATCH] ARM: Fix ARM fault handler for get_user_pages() fixes. X-Git-Tag: Ubuntu-5.2.0-15.16~57720^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=ff2afb9df607dfcaacdaf67ea84b773c6fb08f4c;p=mirror_ubuntu-eoan-kernel.git [PATCH] ARM: Fix ARM fault handler for get_user_pages() fixes. The ARM fault handler is optimised to make the fast path, err, fast. The renumbering of the VM_FAULT_* codes broke this because numbers were used instead of the definitions. Fix this. Signed-off-by: Russell King --- diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index 65bfe84b6d67..0b6c4db44e08 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -238,9 +238,9 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) up_read(&mm->mmap_sem); /* - * Handle the "normal" case first + * Handle the "normal" case first - VM_FAULT_MAJOR / VM_FAULT_MINOR */ - if (fault > 0) + if (fault >= VM_FAULT_MINOR) return 0; /* @@ -261,7 +261,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) do_exit(SIGKILL); return 0; - case 0: + case VM_FAULT_SIGBUS: /* * We had some memory, but were unable to * successfully fix up this page fault.