From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: syzbot <syzbot+ed318e8b790ca72c5ad0@syzkaller.appspotmail.com>
Cc: akpm@linux-foundation.org, kirill.shutemov@linux.intel.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
netdev@vger.kernel.org, syzkaller-bugs@googlegroups.com,
torvalds@linux-foundation.org, william.kucharski@oracle.com,
yang.shi@linux.alibaba.com, ziy@nvidia.com
Subject: Re: general protection fault in khugepaged
Date: Sat, 18 Jul 2020 02:10:23 +0300 [thread overview]
Message-ID: <20200717231023.tawtcmpwwqi2qsni@box> (raw)
In-Reply-To: <0000000000008ad07505aaaad631@google.com>
On Fri, Jul 17, 2020 at 03:40:04PM -0700, syzbot wrote:
> syzbot has bisected this issue to:
>
> commit ffe945e633b527d5a4577b42cbadec3c7cbcf096
> Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Date: Wed Jun 3 23:00:09 2020 +0000
>
> khugepaged: do not stop collapse if less than half PTEs are referenced
>
> bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=17356c2f100000
> start commit: e44f65fd xen-netfront: remove redundant assignment to vari..
> git tree: net-next
> final oops: https://syzkaller.appspot.com/x/report.txt?x=14b56c2f100000
> console output: https://syzkaller.appspot.com/x/log.txt?x=10b56c2f100000
> kernel config: https://syzkaller.appspot.com/x/.config?x=829871134ca5e230
> dashboard link: https://syzkaller.appspot.com/bug?extid=ed318e8b790ca72c5ad0
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=113406a7100000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=175597d3100000
>
> Reported-by: syzbot+ed318e8b790ca72c5ad0@syzkaller.appspotmail.com
> Fixes: ffe945e633b5 ("khugepaged: do not stop collapse if less than half PTEs are referenced")
>
> For information about bisection process see: https://goo.gl/tpsmEJ#bisection
>
My guess is that anonymous VMA got replaced by file VMA under us.
Could you reproduce the issue with the patch below? I have hard time
triggering it myself.
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index b043c40a21d4..f8ec58a1e72b 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -1107,6 +1107,8 @@ static void collapse_huge_page(struct mm_struct *mm,
if (mm_find_pmd(mm, address) != pmd)
goto out;
+ if (!vma->anon_vma)
+ dump_vma(vma);
anon_vma_lock_write(vma->anon_vma);
mmu_notifier_range_init(&range, MMU_NOTIFY_CLEAR, 0, NULL, mm,
--
Kirill A. Shutemov
next prev parent reply other threads:[~2020-07-17 23:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-09 6:43 general protection fault in khugepaged syzbot
2020-07-17 22:40 ` syzbot
2020-07-17 23:10 ` Kirill A. Shutemov [this message]
2020-07-18 8:54 ` Hillf Danton
2020-07-20 9:08 ` Kirill A. Shutemov
2020-07-22 23:53 ` Song Liu
2020-07-24 11:06 ` Kirill A. Shutemov
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=20200717231023.tawtcmpwwqi2qsni@box \
--to=kirill@shutemov.name \
--cc=akpm@linux-foundation.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=netdev@vger.kernel.org \
--cc=syzbot+ed318e8b790ca72c5ad0@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=torvalds@linux-foundation.org \
--cc=william.kucharski@oracle.com \
--cc=yang.shi@linux.alibaba.com \
--cc=ziy@nvidia.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;
as well as URLs for NNTP newsgroup(s).