Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff2afb9d authored by Russell King's avatar Russell King Committed by Russell King
Browse files

[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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent d95a1b48
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -238,9 +238,9 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
	up_read(&mm->mmap_sem);
	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;
		return 0;


	/*
	/*
@@ -261,7 +261,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
		do_exit(SIGKILL);
		do_exit(SIGKILL);
		return 0;
		return 0;


	case 0:
	case VM_FAULT_SIGBUS:
		/*
		/*
		 * We had some memory, but were unable to
		 * We had some memory, but were unable to
		 * successfully fix up this page fault.
		 * successfully fix up this page fault.