linux-next: manual merge of the arc-current tree with Linus' tree

From: Stephen Rothwell
Date: Thu Jan 17 2019 - 16:22:43 EST


Hi all,

Today's linux-next merge of the arc-current tree got a conflict in:

arch/arc/mm/fault.c

between commit:

d8d7d842e828 ("arch/arc/mm/fault.c: remove caller signal_pending_branch predictions")

from Linus' tree and commit:

ce3e02e8be58 ("ARC: mm: do_page_fault fixes #1: relinquish mmap_sem if signal arrives while handle_mm_fault")

from the arc-current tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc arch/arc/mm/fault.c
index a1d723197084,535cf18e8bf2..000000000000
--- a/arch/arc/mm/fault.c
+++ b/arch/arc/mm/fault.c
@@@ -141,12 -141,17 +141,17 @@@ good_area
*/
fault = handle_mm_fault(vma, address, flags);

- /* If Pagefault was interrupted by SIGKILL, exit page fault "early" */
- if (unlikely(fatal_signal_pending(current))) {
+ if (fatal_signal_pending(current)) {
- if ((fault & VM_FAULT_ERROR) && !(fault & VM_FAULT_RETRY))
- up_read(&mm->mmap_sem);
- if (user_mode(regs))
+
+ /*
+ * if fault retry, mmap_sem already relinquished by core mm
+ * so OK to return to user mode (with signal handled first)
+ */
+ if (fault & VM_FAULT_RETRY) {
+ if (!user_mode(regs))
+ goto no_context;
return;
+ }
}

perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);

Attachment: pgpqiC5os3l1V.pgp
Description: OpenPGP digital signature