linux-next: manual merge of the akpm-current tree with the drm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

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

  mm/memory.c

between commit:

  327e9fd48972 ("mm: Split huge pages on write-notify or COW")

from the drm tree and commit:

  de0b1f32cbeb ("userfaultfd: wp: hook userfault handler to write protection fault")

from the akpm-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 mm/memory.c
index efa59b1b109c,9e75440c79ce..000000000000
--- a/mm/memory.c
+++ b/mm/memory.c
@@@ -3949,42 -3969,29 +3969,40 @@@ static inline vm_fault_t create_huge_pm
  /* `inline' is required to avoid gcc 4.1.2 build error */
  static inline vm_fault_t wp_huge_pmd(struct vm_fault *vmf, pmd_t orig_pmd)
  {
- 	if (vma_is_anonymous(vmf->vma))
+ 	if (vma_is_anonymous(vmf->vma)) {
+ 		if (userfaultfd_huge_pmd_wp(vmf->vma, orig_pmd))
+ 			return handle_userfault(vmf, VM_UFFD_WP);
  		return do_huge_pmd_wp_page(vmf, orig_pmd);
+ 	}
 -	if (vmf->vma->vm_ops->huge_fault)
 -		return vmf->vma->vm_ops->huge_fault(vmf, PE_SIZE_PMD);
 +	if (vmf->vma->vm_ops->huge_fault) {
 +		vm_fault_t ret = vmf->vma->vm_ops->huge_fault(vmf, PE_SIZE_PMD);
 +
 +		if (!(ret & VM_FAULT_FALLBACK))
 +			return ret;
 +	}
  
 -	/* COW handled on pte level: split pmd */
 -	VM_BUG_ON_VMA(vmf->vma->vm_flags & VM_SHARED, vmf->vma);
 +	/* COW or write-notify handled on pte level: split pmd. */
  	__split_huge_pmd(vmf->vma, vmf->pmd, vmf->address, false, NULL);
  
  	return VM_FAULT_FALLBACK;
  }
  
- static inline bool vma_is_accessible(struct vm_area_struct *vma)
- {
- 	return vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE);
- }
- 
  static vm_fault_t create_huge_pud(struct vm_fault *vmf)
  {
 -#ifdef CONFIG_TRANSPARENT_HUGEPAGE
 +#if defined(CONFIG_TRANSPARENT_HUGEPAGE) &&			\
 +	defined(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD)
  	/* No support for anonymous transparent PUD pages yet */
  	if (vma_is_anonymous(vmf->vma))
 -		return VM_FAULT_FALLBACK;
 -	if (vmf->vma->vm_ops->huge_fault)
 -		return vmf->vma->vm_ops->huge_fault(vmf, PE_SIZE_PUD);
 +		goto split;
 +	if (vmf->vma->vm_ops->huge_fault) {
 +		vm_fault_t ret = vmf->vma->vm_ops->huge_fault(vmf, PE_SIZE_PUD);
 +
 +		if (!(ret & VM_FAULT_FALLBACK))
 +			return ret;
 +	}
 +split:
 +	/* COW or write-notify not handled on PUD level: split pud.*/
 +	__split_huge_pud(vmf->vma, vmf->pud, vmf->address);
  #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
  	return VM_FAULT_FALLBACK;
  }

Attachment: pgpRi8fToUwUh.pgp
Description: OpenPGP digital signature

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux