From: "Liam R. Howlett" <Liam.Howlett@oracle.com>
To: maple-tree@lists.infradead.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
linux-next@vger.kernel.org
Cc: Liam Howlett <Liam.Howlett@oracle.com>,
syzbot+1d9ec4d1a334ae9e1ca6@syzkaller.appspotmail.com
Subject: [PATCH] mm/madvise: Fix VMA_ITERATOR start position
Date: Wed, 25 Jan 2023 08:58:09 -0500 [thread overview]
Message-ID: <20230125135809.85262-1-Liam.Howlett@oracle.com> (raw)
From: Liam Howlett <Liam.Howlett@oracle.com>
The WARN_ON() in vma_iter_store() detected an invalid VMA iterator
state. Inspecting the code stack from the report shows that the VMA
iterator is never set to the correct start position.
Setting the initialization of the VMA iterator to use the address
'start' fixes this issue.
Reported-by: syzbot+1d9ec4d1a334ae9e1ca6@syzkaller.appspotmail.com
Signed-off-by: Liam Howlett <Liam.Howlett@oracle.com>
---
Andrew, this can be squashed into the mm-unstable ("madvise: use
split_vma() instead of __split_vma()")
mm/madvise.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/madvise.c b/mm/madvise.c
index 7db6622f8293..ca672e37b38c 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -142,7 +142,7 @@ static int madvise_update_vma(struct vm_area_struct *vma,
struct mm_struct *mm = vma->vm_mm;
int error;
pgoff_t pgoff;
- VMA_ITERATOR(vmi, mm, 0);
+ VMA_ITERATOR(vmi, mm, start);
if (new_flags == vma->vm_flags && anon_vma_name_eq(anon_vma_name(vma), anon_name)) {
*prev = vma;
--
2.39.0
reply other threads:[~2023-01-25 13:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230125135809.85262-1-Liam.Howlett@oracle.com \
--to=liam.howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-next@vger.kernel.org \
--cc=maple-tree@lists.infradead.org \
--cc=syzbot+1d9ec4d1a334ae9e1ca6@syzkaller.appspotmail.com \
/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