All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Oleg Nesterov <oleg@redhat.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Dmitry Vyukov <dvyukov@google.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCHv2 1/2] mm: Fix vma_is_anonymous() false-positives
Date: Thu, 12 Jul 2018 19:39:16 +0300	[thread overview]
Message-ID: <20180712163916.pzewd3nhane7af3u@kshutemo-mobl1> (raw)
In-Reply-To: <20180712162039.GA16175@redhat.com>

On Thu, Jul 12, 2018 at 06:20:39PM +0200, Oleg Nesterov wrote:
> Kirill, I am not trying to review this change (but it looks good to me),
> just a silly question...
> 
> On 07/12, Kirill A. Shutemov wrote:
> >
> > This can be fixed by assigning anonymous VMAs own vm_ops and not relying
> > on it being NULL.
> 
> I agree, this makes sense, but...
> 
> > If ->mmap() failed to set ->vm_ops, mmap_region() will set it to
> > dummy_vm_ops.
> 
> Shouldn't this change alone fix the problem?

Unfortunately, no. I've tried it before. Mapping /dev/zero with
MAP_PRIVATE hast to produce anonymous VMA. The trick with dummy_vm_ops
wouldn't be able to handle the situation.

-- 
 Kirill A. Shutemov

  reply	other threads:[~2018-07-12 16:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-12 14:56 [PATCHv2 0/2] Fix crash due to vma_is_anonymous() false-positives Kirill A. Shutemov
2018-07-12 14:56 ` [PATCHv2 1/2] mm: Fix " Kirill A. Shutemov
2018-07-12 16:20   ` Oleg Nesterov
2018-07-12 16:39     ` Kirill A. Shutemov [this message]
2018-07-12 14:56 ` [PATCHv2 2/2] mm: Drop unneeded ->vm_ops checks Kirill A. Shutemov
2018-07-16 13:30   ` REGRESSION: " Marcel Ziswiler
2018-07-16 14:20     ` Kirill A. Shutemov
2018-07-16 16:09       ` Marcel Ziswiler
2018-07-16 16:57         ` Kirill A. Shutemov
2018-07-12 15:08 ` [PATCHv2 0/2] Fix crash due to vma_is_anonymous() false-positives Kirill A. Shutemov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180712163916.pzewd3nhane7af3u@kshutemo-mobl1 \
    --to=kirill@shutemov.name \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dvyukov@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=oleg@redhat.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.