lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20220217181125.138b7340@canb.auug.org.au>
Date:   Thu, 17 Feb 2022 18:11:25 +1100
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Matthew Wilcox <willy@...radead.org>,
        Liam Howlett <liam.howlett@...cle.com>
Cc:     Hugh Dickins <hughd@...gle.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: linux-next: manual merge of the folio tree with the maple tree

Hi all,

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

  mm/mmap.c

between commit:

  b09e8361a4c3 ("mm: Remove the vma linked list")

from the maple tree and commit:

  ad56e23dec9a ("mm/munlock: delete munlock_vma_pages_all(), allow oomreap")

from the folio tree.

I fixed it up (I think - 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/mmap.c
index 1b3600152f6f,64b5985b5295..000000000000
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@@ -3116,30 -3132,13 +3112,19 @@@ void exit_mmap(struct mm_struct *mm
  		set_bit(MMF_OOM_SKIP, &mm->flags);
  	}
  
 -	mmap_write_lock(mm);
 +	/*
 +	 * Actually taking the mmap semaphore here costs 3% performance on
 +	 * a large machine:
 +	 * https://lore.kernel.org/lkml/20170725151754.3txp44a2kbffsxdg@node.shutemov.name/
 +	 * Lockdep will complain about not holding the mmap_lock, so we lie.
 +	 */
 +	rwsem_acquire(&mm->mmap_lock.dep_map, 0, 0, _THIS_IP_);
- 	if (mm->locked_vm) {
- 		mas_for_each(&mas, vma, ULONG_MAX) {
- 			if (vma->vm_flags & VM_LOCKED) {
- 				mm->locked_vm -= vma_pages(vma);
- 				munlock_vma_pages_all(vma);
- 			}
- 		}
- 		mas_set(&mas, 0);
- 	}
- 
  	arch_exit_mmap(mm);
  
 -	vma = mm->mmap;
 +	vma = mas_find(&mas, ULONG_MAX);
  	if (!vma) {
  		/* Can happen if dup_mmap() received an OOM */
 -		mmap_write_unlock(mm);
 +		rwsem_release(&mm->mmap_lock.dep_map, _THIS_IP_);
  		return;
  	}
  

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ