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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7e666361-24cd-4eb4-a591-73a8900bdb5c@lucifer.local>
Date: Mon, 26 Jan 2026 12:25:41 +0000
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Baolin Wang <baolin.wang@...ux.alibaba.com>
Cc: Lance Yang <lance.yang@...ux.dev>, Nico Pache <npache@...hat.com>,
        akpm@...ux-foundation.org, david@...nel.org, ziy@...dia.com,
        Liam.Howlett@...cle.com, ryan.roberts@....com, dev.jain@....com,
        baohua@...nel.org, vbabka@...e.cz, rppt@...nel.org, surenb@...gle.com,
        mhocko@...e.com, linux-trace-kernel@...r.kernel.org,
        linux-doc@...r.kernel.org, corbet@....net, rostedt@...dmis.org,
        mhiramat@...nel.org, mathieu.desnoyers@...icios.com,
        linux-kernel@...r.kernel.org, matthew.brost@...el.com,
        joshua.hahnjy@...il.com, rakie.kim@...com, byungchul@...com,
        gourry@...rry.net, ying.huang@...ux.alibaba.com, apopple@...dia.com,
        jannh@...gle.com, pfalcato@...e.de, jackmanb@...gle.com,
        hannes@...xchg.org, willy@...radead.org, peterx@...hat.com,
        wangkefeng.wang@...wei.com, usamaarif642@...il.com,
        sunnanyong@...wei.com, vishal.moola@...il.com,
        thomas.hellstrom@...ux.intel.com, yang@...amperecomputing.com,
        kas@...nel.org, aarcange@...hat.com, raquini@...hat.com,
        anshuman.khandual@....com, catalin.marinas@....com, tiwai@...e.de,
        will@...nel.org, dave.hansen@...ux.intel.com, jack@...e.cz,
        cl@...two.org, jglisse@...gle.com, zokeefe@...gle.com,
        rientjes@...gle.com, rdunlap@...radead.org, hughd@...gle.com,
        richard.weiyang@...il.com, David Hildenbrand <david@...hat.com>,
        linux-mm@...ck.org
Subject: Re: [PATCH mm-unstable v14 03/16] introduce collapse_single_pmd to
 unify khugepaged and madvise_collapse

On Fri, Jan 23, 2026 at 05:31:17PM +0800, Baolin Wang wrote:
>
>
> On 1/23/26 1:07 PM, Lance Yang wrote:
> >
> >
> > After collapse_single_pmd() returns, mmap_lock might have been released.
> > Between
> > that unlock and here, another thread could unmap/remap the VMA, making
> > the vma
> > pointer stale when we access vma->vm_file?
> >
> > Would it be safer to get the file reference before calling
> > collapse_single_pmd()?
> > Or we need to revalidate the VMA after getting the lock back?
> Good catch. I think we can move the filemap_write_and_wait_range() related
> logic into collapse_single_pmd(), after we get a file reference.

Good suggestion, is what Nico did in the suggested patch :) Agreed better there.

Thanks, Lorenzo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ