From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58B0A20E00B for ; Wed, 25 Jun 2025 20:58:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750885080; cv=none; b=feuT+8D3TpG646J2vOLQIEAzG3toKnplzzoQBAe6iXyh5yXa0C5pwIzUgZ6VERSrq4FVwrNCSY7jb/L1xA+EF6jGNlUQfqSAsiVs1ubmTvN0U6Y3jhVHFEbYeg/7lu9VqE4ffe2ONAwqKoptnYSSMHEzpzHkMW8JihLKUP/GI6c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750885080; c=relaxed/simple; bh=MIXzG4B4N6CU3v4LDCXLnQ5LmjOfyBUxdSDNH6SuKYc=; h=Date:To:From:Subject:Message-Id; b=Jdg6qMzcOYy5UVpuLMMQGdC1qRmHkd0kXezeIHG5gl8EqmuvZJys/98xhQbraPvPa02jl154rWv6I+4JSZPqUuM/ngZsHiALScz+KFzS98iehWZ8t99r1Er4/YBmaog4ifZCoO6W3r7PLT6X8XQqXnM0oFpdpJJ0jWjS4xtRnVg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=Em19gc0e; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="Em19gc0e" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD7D7C4CEEA; Wed, 25 Jun 2025 20:57:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1750885079; bh=MIXzG4B4N6CU3v4LDCXLnQ5LmjOfyBUxdSDNH6SuKYc=; h=Date:To:From:Subject:From; b=Em19gc0eYS0UNppYfwgcBGlVjPLc+Paui1dMmyNeQ/bpBgMwV8kkhDAumWI2AsFrq WokrJKq3wBBc3aVsEALlo+d90bm2Sn4ntka47LlZ3w4r0yoyyle1Epv8e2w0Ejkww1 Ua3K0/LiZIns0UbA9a4Y5clBy+gX6dFwqIWz4V0c= Date: Wed, 25 Jun 2025 13:57:59 -0700 To: mm-commits@vger.kernel.org,yebin10@huawei.com,willy@infradead.org,vbabka@suse.cz,tjmercier@google.com,surenb@google.com,shuah@kernel.org,ryan.roberts@arm.com,peterx@redhat.com,paulmck@kernel.org,osalvador@suse.de,mhocko@kernel.org,linux@weissschuh.net,liam.howlett@oracle.com,kaleshsingh@google.com,josef@toxicpanda.com,jannh@google.com,hannes@cmpxchg.org,david@redhat.com,christophe.leroy@csgroup.eu,brauner@kernel.org,andrii@kernel.org,adobriyan@gmail.com,lorenzo.stoakes@oracle.com,akpm@linux-foundation.org From: Andrew Morton Subject: + mm-maps-read-proc-pid-maps-under-per-vma-lock-fix.patch added to mm-new branch Message-Id: <20250625205759.BD7D7C4CEEA@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The patch titled Subject: mm/madvise: fixup stray mmap lock assert in anon_vma_name() has been added to the -mm mm-new branch. Its filename is mm-maps-read-proc-pid-maps-under-per-vma-lock-fix.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-maps-read-proc-pid-maps-under-per-vma-lock-fix.patch This patch will later appear in the mm-new branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new. Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Lorenzo Stoakes Subject: mm/madvise: fixup stray mmap lock assert in anon_vma_name() Date: Wed, 25 Jun 2025 13:28:36 +0100 anon_vma_name() is being called under VMA lock, but is assert mmap lock which won't necessarily be held. This results in the kernel spamming warnings about this on startup. Replace this with an open-coded 'mmap or VMA lock' assert to resolve. Link: https://lkml.kernel.org/r/fd305c41-b2a3-4f0c-a64d-6e2358859529@lucifer.local Signed-off-by: Lorenzo Stoakes Acked-by: Suren Baghdasaryan Cc: Alexey Dobriyan Cc: Andrii Nakryiko Cc: Christian Brauner Cc: Christophe Leroy Cc: David Hildenbrand Cc: Jann Horn Cc: Johannes Weiner Cc: Josef Bacik Cc: Kalesh Singh Cc: Liam Howlett Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Oscar Salvador Cc: "Paul E . McKenney" Cc: Peter Xu Cc: Ryan Roberts Cc: Shuah Khan Cc: Thomas Weißschuh Cc: T.J. Mercier Cc: Vlastimil Babka Cc: Ye Bin Signed-off-by: Andrew Morton --- mm/madvise.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/mm/madvise.c~mm-maps-read-proc-pid-maps-under-per-vma-lock-fix +++ a/mm/madvise.c @@ -108,7 +108,8 @@ void anon_vma_name_free(struct kref *kre struct anon_vma_name *anon_vma_name(struct vm_area_struct *vma) { - mmap_assert_locked(vma->vm_mm); + if (!rwsem_is_locked(&vma->vm_mm->mmap_lock)) + vma_assert_locked(vma); return vma->anon_name; } _ Patches currently in -mm which might be from lorenzo.stoakes@oracle.com are maintainers-add-missing-files-to-mm-page-alloc-section.patch docs-mm-expand-vma-doc-to-highlight-pte-freeing-non-vma-traversal.patch mm-ksm-have-ksm-vma-checks-not-require-a-vma-pointer.patch mm-ksm-refer-to-special-vmas-via-vm_special-in-ksm_compatible.patch mm-prevent-ksm-from-breaking-vma-merging-for-new-vmas.patch mm-prevent-ksm-from-breaking-vma-merging-for-new-vmas-fix.patch tools-testing-selftests-add-vma-merge-tests-for-ksm-merge.patch mm-use-per_vma-lock-for-madv_dontneed-fix.patch mm-pagewalk-split-walk_page_range_novma-into-kernel-user-parts.patch secretmem-remove-uses-of-struct-page-fix.patch mm-vma-use-vmg-target-to-specify-target-vma-for-new-vma-merge.patch mm-vma-use-vmg-target-to-specify-target-vma-for-new-vma-merge-fix.patch mm-change-vm_get_page_prot-to-accept-vm_flags_t-argument.patch mm-change-vm_get_page_prot-to-accept-vm_flags_t-argument-fix.patch mm-update-core-kernel-code-to-use-vm_flags_t-consistently.patch mm-update-architecture-and-driver-code-to-use-vm_flags_t.patch mm-madvise-remove-the-visitor-pattern-and-thread-anon_vma-state.patch mm-madvise-thread-mm_struct-through-madvise_behavior.patch mm-madvise-thread-vma-range-state-through-madvise_behavior.patch mm-madvise-thread-all-madvise-state-through-madv_behavior.patch mm-madvise-eliminate-very-confusing-manipulation-of-prev-vma.patch mm-madvise-eliminate-very-confusing-manipulation-of-prev-vma-fix.patch mm-maps-read-proc-pid-maps-under-per-vma-lock-fix.patch