From: Greg KH <gregkh@linuxfoundation.org>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: stable@vger.kernel.org, Lorenzo Stoakes <lstoakes@gmail.com>,
Vlastimil Babka <vbabka@suse.cz>, Jann Horn <jannh@google.com>,
Matthew Wilcox <willy@infradead.org>,
Suren Baghdasaryan <surenb@google.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 6.5.y] mmap: fix error paths with dup_anon_vma()
Date: Mon, 6 Nov 2023 12:33:37 +0100 [thread overview]
Message-ID: <2023110624-bodacious-matchbook-654e@gregkh> (raw)
In-Reply-To: <20231101144138.3513378-1-Liam.Howlett@oracle.com>
On Wed, Nov 01, 2023 at 10:41:38AM -0400, Liam R. Howlett wrote:
> commit 824135c46b00df7fb369ec7f1f8607427bbebeb0 upstream
>
> When the calling function fails after the dup_anon_vma(), the
> duplication of the anon_vma is not being undone. Add the necessary
> unlink_anon_vma() call to the error paths that are missing them.
>
> This issue showed up during inspection of the error path in vma_merge()
> for an unrelated vma iterator issue.
>
> Users may experience increased memory usage, which may be problematic as
> the failure would likely be caused by a low memory situation.
>
> Link: https://lkml.kernel.org/r/20230929183041.2835469-3-Liam.Howlett@oracle.com
> Fixes: d4af56c5c7c6 ("mm: start tracking VMAs with maple tree")
> Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
> Reviewed-by: Lorenzo Stoakes <lstoakes@gmail.com>
> Acked-by: Vlastimil Babka <vbabka@suse.cz>
> Cc: Jann Horn <jannh@google.com>
> Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
> Cc: Suren Baghdasaryan <surenb@google.com>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
> ---
> mm/mmap.c | 30 ++++++++++++++++++++++--------
> 1 file changed, 22 insertions(+), 8 deletions(-)
All backports now queued up, thanks.
greg k-h
prev parent reply other threads:[~2023-11-06 11:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-27 12:14 FAILED: patch "[PATCH] mmap: fix error paths with dup_anon_vma()" failed to apply to 6.5-stable tree gregkh
2023-11-01 14:41 ` [PATCH 6.5.y] mmap: fix error paths with dup_anon_vma() Liam R. Howlett
2023-11-06 11:33 ` Greg KH [this message]
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=2023110624-bodacious-matchbook-654e@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=jannh@google.com \
--cc=lstoakes@gmail.com \
--cc=stable@vger.kernel.org \
--cc=surenb@google.com \
--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