From: Greg KH <greg@kroah.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
lstoakes@gmail.com, regressions@lists.linux.dev,
linux-mm@kvack.org, patches@lists.linux.dev,
linux-kernel@vger.kernel.org, Jiri Slaby <jirislaby@kernel.org>,
Fabian Vogt <fvogt@suse.com>,
stable@vger.kernel.org
Subject: Re: [PATCH for v6.3 regression] mm/mremap: fix vm_pgoff in vma_merge() case 3
Date: Thu, 27 Apr 2023 16:27:44 +0200 [thread overview]
Message-ID: <2023042719-stratus-pavestone-505e@gregkh> (raw)
In-Reply-To: <20230427140959.27655-1-vbabka@suse.cz>
On Thu, Apr 27, 2023 at 04:09:59PM +0200, Vlastimil Babka wrote:
> After upgrading build guests to v6.3, rpm started segfaulting for
> specific packages, which was bisected to commit 0503ea8f5ba7 ("mm/mmap:
> remove __vma_adjust()"). rpm is doing many mremap() operations with file
> mappings of its db. The problem is that in vma_merge() case 3 (we merge
> with the next vma, expanding it downwards) vm_pgoff is not adjusted as
> it should when vm_start changes. As a result the rpm process most likely
> sees data from the wrong offset of the file. Fix the vm_pgoff
> calculation.
>
> For case 8 this is a non-functional change as the resulting vm_pgoff is
> the same.
>
> Reported-and-bisected-by: Jiri Slaby <jirislaby@kernel.org>
> Reported-and-tested-by: Fabian Vogt <fvogt@suse.com>
> Link: https://bugzilla.suse.com/show_bug.cgi?id=1210903
> Fixes: 0503ea8f5ba7 ("mm/mmap: remove __vma_adjust()")
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> Cc: <stable@vger.kernel.org>
> ---
> Hi, I'm sending this patch on top of v6.3 as I think it should be
> applied and backported to 6.3-stable rather sooner than later.
> This means there would be a small conflict when merging mm/mm-stable
> later. Alternatively it could be added to mm/mm-stable and upcoming 6.4
> pull request, but then the stable backport would need adjustment.
> It's up to Linus and Andrew.
That's not how the stable tree works, sorry, it needs to be in Linus's
tree _first_.
thanks,
greg k-h
next prev parent reply other threads:[~2023-04-27 14:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-27 14:09 Vlastimil Babka
2023-04-27 14:15 ` Vlastimil Babka
2023-04-27 14:27 ` Greg KH [this message]
2023-04-27 14:39 ` Vlastimil Babka
2023-04-27 15:12 ` Linus Torvalds
2023-04-28 2:53 ` Linus Torvalds
2023-04-28 7:13 ` Vlastimil Babka
2023-04-28 7:36 ` Greg KH
2023-04-28 6:15 ` Jiri Slaby
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=2023042719-stratus-pavestone-505e@gregkh \
--to=greg@kroah.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=fvogt@suse.com \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lstoakes@gmail.com \
--cc=patches@lists.linux.dev \
--cc=regressions@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=vbabka@suse.cz \
/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