Re: [RFC PATCH 2/6] mm: nommu: use vma_is_anonymous() to check if vmas are anonymous

Hajime Tazaki <[email protected]>
Newsgroups org.kvack.linux-mm
Message-ID <[email protected]>
On Fri, 14 Aug 2026 20:52:42 +0900,
Lorenzo Stoakes (ARM) wrote:
> 
> On Thu, Aug 13, 2026 at 03:33:57PM +0900, Hajime Tazaki wrote:
> > Private file mappings (like those from /dev/zero) can have vma->vm_file
> > set but remain structurally anonymous since they lack vm_ops. Testing
> > vma->vm_file instead of vma_is_anonymous(vma) might cause mremap to
> > return a spurious -EINVAL when userspace attempts to shrink these
> > mappings.
> >
> > This commit fixes this issue by using vma_is_anonymous() instead of
> > testing vma->vm_file to address the case of /dev/zero.
(snip)
> 
> As staged in review on 1/6 you need to squash this somehow.

I see, thanks for point this out.

-- Hajime
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.