Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2347031pxb; Sun, 24 Jan 2021 04:05:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzqsE8XmsAk98qU9yfV6nq+S8tEpkr6MhvFKdciws/92Vz/vDNkevy1kmMOlp5mEOTrJkQH X-Received: by 2002:a50:b742:: with SMTP id g60mr438519ede.113.1611489958693; Sun, 24 Jan 2021 04:05:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611489958; cv=none; d=google.com; s=arc-20160816; b=gHMJVDkLT+f/x1WPlTVJ9Q4uZXA+kvlaBkkyg0R/yt2U0UtEixmkdYQDtuArA7LOL5 5bziZTpZueDSvnzCRmbJKad2AwVW30cid0X8ofFr2O4pcEiCL0/pQsXMONnHxpbSTv+m YQnXPDDGbsM/xuD30RXxAK+FNSmAO15b04vWzHqm5aRvgLDFMq+w3A5vwYGa02nDhNH+ 2rQMkevGdpyKt31d+H0e6aeWDrSkB2Ajl2zGipyBAg0cQ+h7W6ss41GRaO6dmp5QsLUm kHGiBJeX1KgYW2MDtECLGqvk0fxc1cKgxuxLZGSosy68JoDmJb4w6BAastCVuwjQB46B wB9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:message-id:date:mime-version; bh=vpWaUODVjexSZHkJhlfiwbb9m6p+9vhL1cMPROdA9U0=; b=B1iumOy2MTA/KoNl0yPRtwkVTrcqIcH4l9GT797AKPFcg788iFa5NsSyz2D0D/j/2K RRR6XCsZQX+0g1eGNViNTrHN+h8wgU3lX2JLRLpMlsbR/ZGOXUDTHTeFKP0wQ9e0A9Y/ 1EE8IN6rSCwAwk+uIsxHBkn0ONLXLvZO5kRdc6HNLXiOmSlnnosNtSUTsMHL4J/WSI6Z /YOG0sxeGonyKoNlUzeF2Q89IXjVKdi6QmXyy/NuwYvBsyP+VHNZCDO5JgBzcj1vsSFz 6FsmjjBq+LomdL72b8vjsbvQJ5N3Pr+uVZOiMXslxPV7r+Tq5vHxkhvMS29MT0AMhukk s3Aw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jt18si5011325ejb.633.2021.01.24.04.05.34; Sun, 24 Jan 2021 04:05:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726741AbhAXMDA (ORCPT + 99 others); Sun, 24 Jan 2021 07:03:00 -0500 Received: from mail-io1-f71.google.com ([209.85.166.71]:43664 "EHLO mail-io1-f71.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726808AbhAXMB7 (ORCPT ); Sun, 24 Jan 2021 07:01:59 -0500 Received: by mail-io1-f71.google.com with SMTP id d8so911630ion.10 for ; Sun, 24 Jan 2021 04:01:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=vpWaUODVjexSZHkJhlfiwbb9m6p+9vhL1cMPROdA9U0=; b=hzFGJIvDDVXzfmrgFupmbYh9PY/p7xyGu9Rfg+HYOIHC3EAw1wFpoYGrQ+egT2zGGU 1WsB61ZyVCHrwqOiIGw/yPPzMDPHSURD+UHD3UOXb2wwTipaswTGlri/wVUpLNIDx1Os V9k1VluTIgH5bl9uTQHWh/XYVhfErAdpWTEqGkpzQHBUG1Ac4J1UlOMCXijUyKOss8he C9qukVWV4vWeCD9MGckp7WiNBOpZQYWZeKHqaC/bLmJTv3OXlWz25awgVAmtd3HTfxIJ lEePL1ALsZ8/3dreFyO6NSmWsestVTX6EHcia/oRYSUdJiqluKyCNiUbgJVPpHcjxJ3A VytA== X-Gm-Message-State: AOAM533JLJXtoBW24GNtdo3Gs2WNMExW/1ETwqppHupdsVwEAHclfvIL v5pK9pd2w1+o3VZov2cBod13CbBg+s850/2s//RSHK9Y9Q4T MIME-Version: 1.0 X-Received: by 2002:a92:ca81:: with SMTP id t1mr1117830ilo.139.1611489677023; Sun, 24 Jan 2021 04:01:17 -0800 (PST) Date: Sun, 24 Jan 2021 04:01:17 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <000000000000c21dd605b9a42d3f@google.com> Subject: kernel BUG in split_huge_page_to_list From: syzbot To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, lixinhai.lxh@gmail.com, sfr@canb.auug.org.au, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, syzbot found the following issue on: HEAD commit: 647060f3 Add linux-next specific files for 20210120 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=16f0353f500000 kernel config: https://syzkaller.appspot.com/x/.config?x=8f8a72b7e5067002 dashboard link: https://syzkaller.appspot.com/bug?extid=9b83ff893245a25c320e compiler: gcc (GCC) 10.1.0-syz 20200507 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=143d7e3b500000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17652feb500000 The issue was bisected to: commit fbdbae3da30a149a55a5f1883bbbe17a27660e05 Author: Li Xinhai Date: Tue Jan 19 21:54:00 2021 +0000 mm: mremap: unlink anon_vmas when mremap with MREMAP_DONTUNMAP success bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=16cad100d00000 final oops: https://syzkaller.appspot.com/x/report.txt?x=15cad100d00000 console output: https://syzkaller.appspot.com/x/log.txt?x=11cad100d00000 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+9b83ff893245a25c320e@syzkaller.appspotmail.com Fixes: fbdbae3da30a ("mm: mremap: unlink anon_vmas when mremap with MREMAP_DONTUNMAP success") head:00000000091c6650 order:9 compound_mapcount:0 compound_pincount:0 memcg:ffff888010d0a000 anon flags: 0xfff0000009001d(locked|uptodate|dirty|lru|head|swapbacked) raw: 00fff0000009001d ffffea0000bc51c8 ffff888010201800 ffff88802575d801 raw: 0000000000020e00 0000000000000000 000001fc00000000 ffff888010d0a000 page dumped because: VM_BUG_ON_PAGE(!unmap_success) ------------[ cut here ]------------ kernel BUG at mm/huge_memory.c:2351! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 8483 Comm: syz-executor525 Not tainted 5.11.0-rc4-next-20210120-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:unmap_page mm/huge_memory.c:2351 [inline] RIP: 0010:split_huge_page_to_list+0x1f02/0x43b0 mm/huge_memory.c:2720 Code: ef e8 82 46 ea ff 0f 0b e8 ab 69 b9 ff 4c 8d 73 ff e9 56 ea ff ff e8 9d 69 b9 ff 48 c7 c6 40 69 57 89 48 89 ef e8 5e 46 ea ff <0f> 0b e8 87 69 b9 ff 4c 8d 75 ff e9 28 e9 ff ff e8 79 69 b9 ff 49 RSP: 0018:ffffc9000168f7a0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff88801e2d5400 RSI: ffffffff88bcc6c7 RDI: fffff520002d1e8e RBP: ffffea0000ca8000 R08: 0000000000000033 R09: 0000000000000000 R10: ffffffff815b136e R11: 0000000000000000 R12: ffff888010d0ae60 R13: ffffea0000ca8000 R14: 000000000000018c R15: 0000000000000000 FS: 000000000154e880(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fcc655666c0 CR3: 0000000012e9a000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: split_huge_page include/linux/huge_mm.h:187 [inline] madvise_free_pte_range+0x736/0x1ee0 mm/madvise.c:633 walk_pmd_range mm/pagewalk.c:89 [inline] walk_pud_range mm/pagewalk.c:160 [inline] walk_p4d_range mm/pagewalk.c:193 [inline] walk_pgd_range mm/pagewalk.c:229 [inline] __walk_page_range+0xe20/0x1ea0 mm/pagewalk.c:331 walk_page_range+0x20d/0x400 mm/pagewalk.c:427 madvise_free_single_vma+0x383/0x550 mm/madvise.c:731 madvise_dontneed_free mm/madvise.c:819 [inline] madvise_vma mm/madvise.c:936 [inline] do_madvise.part.0+0x4e4/0x1ed0 mm/madvise.c:1132 do_madvise mm/madvise.c:1158 [inline] __do_sys_madvise mm/madvise.c:1158 [inline] __se_sys_madvise mm/madvise.c:1156 [inline] __x64_sys_madvise+0x113/0x150 mm/madvise.c:1156 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x440219 Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b 13 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007ffc51b58b98 EFLAGS: 00000246 ORIG_RAX: 000000000000001c RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440219 RDX: 0000000000000008 RSI: 0000000000c00000 RDI: 0000000020400000 RBP: 00000000006ca018 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020ffc000 R11: 0000000000000246 R12: 0000000000401a20 R13: 0000000000401ab0 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: ---[ end trace 7812a13de61fd12e ]--- RIP: 0010:unmap_page mm/huge_memory.c:2351 [inline] RIP: 0010:split_huge_page_to_list+0x1f02/0x43b0 mm/huge_memory.c:2720 Code: ef e8 82 46 ea ff 0f 0b e8 ab 69 b9 ff 4c 8d 73 ff e9 56 ea ff ff e8 9d 69 b9 ff 48 c7 c6 40 69 57 89 48 89 ef e8 5e 46 ea ff <0f> 0b e8 87 69 b9 ff 4c 8d 75 ff e9 28 e9 ff ff e8 79 69 b9 ff 49 RSP: 0018:ffffc9000168f7a0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff88801e2d5400 RSI: ffffffff88bcc6c7 RDI: fffff520002d1e8e RBP: ffffea0000ca8000 R08: 0000000000000033 R09: 0000000000000000 R10: ffffffff815b136e R11: 0000000000000000 R12: ffff888010d0ae60 R13: ffffea0000ca8000 R14: 000000000000018c R15: 0000000000000000 FS: 000000000154e880(0000) GS:ffff8880b9e00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fcc655666c0 CR3: 0000000012e9a000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 --- This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. For information about bisection process see: https://goo.gl/tpsmEJ#bisection syzbot can test patches for this issue, for details see: https://goo.gl/tpsmEJ#testing-patches