lkml.org 
[lkml]   [2015]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: LTP regressions due to 6dc296e7df4c ("mm: make sure all file VMAs have ->vm_ops set")
On 09/14, Oleg Nesterov wrote:
>
> On 09/14, Kirill A. Shutemov wrote:
> >
> > Fix is below. I don't really like it, but I cannot find any better
> > solution.
>
> Me too...
>
> But this change "documents" the nasty special "vm_file && !vm_ops" case, and
> I am not sure how we can remove it later...
>
> So perhaps we should change vma_is_anonymous() back to check ->fault too,
>
> static inline bool vma_is_anonymous(struct vm_area_struct *vma)
> {
> - return !vma->vm_ops;
> + return !vma->vm_ops || !vma->vm_ops->fault;
> }
>
> and remove the "vma->vm_file && !vma->vm_ops" checks in mmap_region() paths.
^^^

sorry, I actually meant "or remove". But perhaps "and" makes sense too.

Say, if we change vma_is_anonymous() as above, then we can kill
arch_vma_name() on x86. mpx_mmap() can install the dummy vm_ops with
the single ->name() method.

> I dunno.

Yes. Up to you.

Oleg.



\
 
 \ /
  Last update: 2015-09-14 20:01    [W:0.096 / U:2.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site