On Mon, Sep 14, 2015 at 07:05:47PM +0200, 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;

No. This would give a lot false positives from drives which setup page
tables upfront and don't use ->fault at all.

>        }
> 
> and remove the "vma->vm_file && !vma->vm_ops" checks in mmap_region() paths.
> 
> I dunno.
> 
> Oleg.
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to [email protected].  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"[email protected]";> [email protected] </a>

-- 
 Kirill A. Shutemov
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to