mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
	linux-mm@kvack.org, mm-commits@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] MM updates for 6.3-rc1
Date: Sat, 25 Feb 2023 19:57:27 -0800	[thread overview]
Message-ID: <20230225195727.1b73a356f4f1a79833a31885@linux-foundation.org> (raw)
In-Reply-To: <CAHk-=wjFmVL7NiuxL54qLkoabni_yD-oF9=dpDgETtdsiCbhUg@mail.gmail.com>

On Sat, 25 Feb 2023 19:53:04 -0800 Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Sat, Feb 25, 2023 at 7:27 PM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > Will bisect further, but adding Liam to the participants because it's
> > now narrowed down to his changes.
> 
> Ok, it's commit 2286a6914c77 ("mm: change mprotect_fixup to vma iterator")

Liam sent us a fix yesterday, hopefully this?


From: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Subject: mm/mprotect: Fix successful vma_merge() of next in do_mprotect_pkey()
Date: Fri, 24 Feb 2023 16:20:55 -0500

If mprotect_fixup() successfully calls vma_merge() and replaces vma and
the next vma, then the tmp variable in the do_mprotect_pkey() is not
updated to point to the new vma end.  This results in the loop detecting a
gap between VMAs that does not exist.  Fix the faulty value of tmp by
setting it to the end location of the vma iterator at the end of the loop.

Link: https://lkml.kernel.org/r/20230224212055.1786100-1-Liam.Howlett@oracle.com
Fixes: 2286a6914c77 ("mm: change mprotect_fixup to vma iterator")
Link: https://lore.kernel.org/linux-mm/20230223120407.729110a6ecd1416ac59d9cb0@linux-foundation.org/
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Reported-by: Bert Karwatzki <spasswolf@web.de>
  Link: https://bugzilla.kernel.org/show_bug.cgi?id=217061
Tested-by: Bert Karwatzki <spasswolf@web.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---


--- a/mm/mprotect.c~mm-mprotect-fix-successful-vma_merge-of-next-in-do_mprotect_pkey
+++ b/mm/mprotect.c
@@ -832,6 +832,7 @@ static int do_mprotect_pkey(unsigned long start, size_t len,
 		if (error)
 			break;
 
+		tmp = vma_iter_end(&vmi);
 		nstart = tmp;
 		prot = reqprot;
 	}
_


  reply	other threads:[~2023-02-26  3:58 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-20 21:52 [GIT PULL] MM updates for 6.3-rc1 Andrew Morton
2023-02-21 23:36 ` Andrew Morton
2023-02-24  1:33 ` pr-tracker-bot
2023-02-24  1:33 ` Linus Torvalds
2023-02-24  1:56   ` Andrew Morton
2023-02-24  3:01   ` Huang, Ying
2023-02-24  9:04 ` David Howells
2023-02-24 12:12 ` David Howells
2023-02-24 14:31 ` [RFC][PATCH] cifs: Fix cifs_writepages_region() David Howells
2023-02-24 16:06   ` Linus Torvalds
2023-02-24 16:11   ` Matthew Wilcox
2023-02-24 17:15   ` David Howells
2023-02-24 18:44     ` Matthew Wilcox
2023-02-24 20:13     ` David Howells
2023-02-24 20:16       ` Linus Torvalds
2023-02-24 20:45         ` Matthew Wilcox
2023-02-27 13:20         ` David Howells
2023-02-24 20:58       ` David Howells
2023-02-24 17:19   ` David Howells
2023-02-24 18:58     ` Linus Torvalds
2023-02-24 19:05       ` Linus Torvalds
2023-03-01 18:32         ` [EXTERNAL] " Steven French
2023-02-24 14:48 ` [RFC][PATCH] cifs, afs: Revert changes to {cifs,afs}_writepages_region() David Howells
2023-02-24 16:13   ` Linus Torvalds
2023-02-24 15:13 ` [RFC][PATCH] cifs: Improve use of filemap_get_folios_tag() David Howells
2023-02-24 16:22   ` Linus Torvalds
2023-02-24 17:22   ` David Howells
2023-02-26  2:43 ` [GIT PULL] MM updates for 6.3-rc1 Linus Torvalds
2023-02-26  3:27   ` Linus Torvalds
2023-02-26  3:53     ` Linus Torvalds
2023-02-26  3:57       ` Andrew Morton [this message]
2023-02-26  4:03         ` Linus Torvalds
2023-02-26  4:12           ` Linus Torvalds

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=20230225195727.1b73a356f4f1a79833a31885@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=Liam.Howlett@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).