linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Suren Baghdasaryan <surenb@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
	linux-mm@kvack.org,  linux-kernel@vger.kernel.org,
	Jann Horn <jannh@google.com>,
	 Lorenzo Stoakes <lstoakes@gmail.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	 Matthew Wilcox <willy@infradead.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH v3 2/3] mmap: Fix error paths with dup_anon_vma()
Date: Fri, 6 Oct 2023 14:32:16 -0700	[thread overview]
Message-ID: <CAJuCfpETk0=meVBHO0wfchm12eYZk2j7NcjJYxvh=qJOe4ySqQ@mail.gmail.com> (raw)
In-Reply-To: <20231006140834.07110f7008677c646af1694d@linux-foundation.org>

On Fri, Oct 6, 2023 at 2:08 PM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Tue, 3 Oct 2023 09:21:22 -0700 Suren Baghdasaryan <surenb@google.com> wrote:
>
> > > @@ -633,7 +641,7 @@ int vma_expand(struct vma_iterator *vmi, struct vm_area_struct *vma,
> > >
> > >                 remove_next = true;
> > >                 vma_start_write(next);
> > > -               ret = dup_anon_vma(vma, next);
> > > +               ret = dup_anon_vma(vma, next, &anon_dup);
> > >                 if (ret)
> > >                         return ret;
> >
> > Shouldn't the above be changed to a "goto nomem" instead of "return ret" ?
>
> It looks OK to me as-is - dup_anon_vma() leaves anon_dup==NULL
> when it returns error.

Yes, I realised that after sending the question and didn't want to
create more noise than I already did... All seems good.


  reply	other threads:[~2023-10-06 21:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-29 18:30 [PATCH v3 0/3] Fixes for vma_merge() error path Liam R. Howlett
2023-09-29 18:30 ` [PATCH v3 1/3] mmap: Fix vma_iterator in error path of vma_merge() Liam R. Howlett
2023-09-29 22:21   ` Lorenzo Stoakes
2023-10-02  7:09   ` Vlastimil Babka
2023-09-29 18:30 ` [PATCH v3 2/3] mmap: Fix error paths with dup_anon_vma() Liam R. Howlett
2023-09-29 22:28   ` Lorenzo Stoakes
2023-10-02  7:26     ` Vlastimil Babka
2023-10-02  7:43       ` Lorenzo Stoakes
2023-10-03 14:45         ` Liam R. Howlett
2023-10-02  7:11   ` Vlastimil Babka
2023-10-03 16:21   ` Suren Baghdasaryan
2023-10-03 18:51     ` Liam R. Howlett
2023-10-03 19:40       ` Suren Baghdasaryan
2023-10-06 21:08     ` Andrew Morton
2023-10-06 21:32       ` Suren Baghdasaryan [this message]
2023-09-29 18:30 ` [PATCH v3 3/3] mmap: Add clarifying comment to vma_merge() code Liam R. Howlett
2023-09-29 22:30   ` Lorenzo Stoakes
2023-10-02  7:11   ` Vlastimil Babka

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='CAJuCfpETk0=meVBHO0wfchm12eYZk2j7NcjJYxvh=qJOe4ySqQ@mail.gmail.com' \
    --to=surenb@google.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=jannh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lstoakes@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox