Re: [syzbot] [mm?] WARNING in mmap_region
"Lorenzo Stoakes (ARM)" <[email protected]>
| Newsgroups | gmane.linux.kernel,gmane.linux.kernel.mm |
|---|---|
| Message-ID | <anm1MJYQ8-NPWrxg@lucifer> |
On Sat, Aug 08, 2026 at 01:10:31PM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit: 1701fda2f58e Add linux-next specific files for 20260805 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=120a0fb9580000 > kernel config: https://syzkaller.appspot.com/x/.config?x=1abaff330e312dba > dashboard link: https://syzkaller.appspot.com/bug?extid=d3c6764857d7cac5048a > compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1255d7b9580000 > > Downloadable assets: > disk image: https://storage.googleapis.com/syzbot-assets/260da702bc71/disk-1701fda2.raw.xz > vmlinux: https://storage.googleapis.com/syzbot-assets/006e50e3e545/vmlinux-1701fda2.xz > kernel image: https://storage.googleapis.com/syzbot-assets/232c4643654a/bzImage-1701fda2.xz > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: [email protected] > > ------------[ cut here ]------------ > vma_is_anonymous(vma) > WARNING: mm/internal.h:241 at mmap_file mm/internal.h:241 [inline], CPU#0: syz.0.17/5892 This is: /* Hooks cannot mark themselves anonymous. */ if (WARN_ON_ONCE(vma_is_anonymous(vma))) err = -EINVAL; And this is a known bug that was addressed in v3 of my series (which is currently at v4) - commit 1701fda2f58e (next-20260805) has the v2 (master has v4). Pertinent change: - Fixed an issue with drivers that intentionally mark vma->vm_ops as NULL (using the legacy ->mmap callback). If they do this set dummy ops, which is what they meant. The mmap_prepare case is fine as nobody does this there and this will be fixed when all drivers are finally converted to mmap_prepare. As reported by Sashiko. From https://lore.kernel.org/all/[email protected]/ And the stack below suggests this is the mmap path as expected (no mmap_prepare callback does this :) So TL;DR - this is already fixed - nothing to see here folks :) > WARNING: mm/internal.h:241 at __mmap_new_file_vma mm/vma.c:2586 [inline], CPU#0: syz.0.17/5892 > WARNING: mm/internal.h:241 at __mmap_new_vma mm/vma.c:2685 [inline], CPU#0: syz.0.17/5892 > WARNING: mm/internal.h:241 at __mmap_region mm/vma.c:2905 [inline], CPU#0: syz.0.17/5892 > WARNING: mm/internal.h:241 at mmap_region+0x1f8d/0x2460 mm/vma.c:2990, CPU#0: syz.0.17/5892 > Modules linked in: > CPU: 0 UID: 0 PID: 5892 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 > RIP: 0010:mmap_file mm/internal.h:241 [inline] > RIP: 0010:__mmap_new_file_vma mm/vma.c:2586 [inline] > RIP: 0010:__mmap_new_vma mm/vma.c:2685 [inline] > RIP: 0010:__mmap_region mm/vma.c:2905 [inline] > RIP: 0010:mmap_region+0x1f8d/0x2460 mm/vma.c:2990 > Code: d6 a0 ff e9 69 f1 ff ff e8 10 d6 a0 ff 90 0f 0b 90 e9 5f e2 ff ff e8 02 d6 a0 ff 90 0f 0b 90 e9 02 fe ff ff e8 f4 d5 a0 ff 90 <0f> 0b 90 c7 44 24 08 ea ff ff ff 48 b8 00 00 00 00 00 fc ff df 41 > RSP: 0018:ffffc900037bf560 EFLAGS: 00010293 > RAX: ffffffff8226adfc RBX: fffff520006f7ec0 RCX: ffff88801d711f40 > RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000001 > RBP: ffffc900037bfb70 R08: ffff8880122eb803 R09: 1ffff1100245d700 > R10: dffffc0000000000 R11: ffffed100245d701 R12: dffffc0000000000 > R13: 1ffff920006f7efd R14: 1ffff11006c41e09 R15: ffff88803620f048 > FS: 0000555564503500(0000) GS:ffff888124f18000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > CR2: 00007fa7f9a70000 CR3: 0000000071f6c000 CR4: 00000000003526f0 > Call Trace: > <TASK> > do_mmap+0xe0a/0x1300 mm/mmap.c:573 > vm_mmap_pgoff+0x272/0x4e0 mm/util.c:581 > ksys_mmap_pgoff+0x4dc/0x760 mm/mmap.c:619 > do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] > do_syscall_64+0x166/0x510 arch/x86/entry/syscall_64.c:84 > entry_SYSCALL_64_after_hwframe+0x77/0x7f > RIP: 0033:0x7fa7f9b9e0d9 > Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 > RSP: 002b:00007fffcfdacab8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 > RAX: ffffffffffffffda RBX: 00007fa7f9e25fa0 RCX: 00007fa7f9b9e0d9 > RDX: 0000000002000000 RSI: 0000000000003000 RDI: 0000200000ffa000 > RBP: 00007fa7f9c35024 R08: 0000000000000003 R09: 0000000100000000 > R10: 0000000000000013 R11: 0000000000000246 R12: 0000000000000000 > R13: 00007fa7f9e25fac R14: 00007fa7f9e25fa0 R15: 00007fa7f9e25fa0 > </TASK> > > > --- > 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 [email protected]. > > syzbot will keep track of this issue. See: > https://goo.gl/tpsmEJ#status for how to communicate with syzbot. > > If the report is already addressed, let syzbot know by replying with: > #syz fix: exact-commit-title > > If you want syzbot to run the reproducer, reply with: > #syz test: git://repo/address.git branch-or-commit-hash > If you attach or paste a git patch, syzbot will apply it before testing. > > If you want to overwrite report's subsystems, reply with: > #syz set subsystems: new-subsystem > (See the list of subsystem names on the web dashboard) > > If the report is a duplicate of another one, reply with: > #syz dup: exact-subject-of-another-report > > If you want to undo deduplication, reply with: > #syz undup -- Cheers, Lorenzo