syzbot


kernel BUG in filemap_unaccount_folio

Status: upstream: reported C repro on 2023/09/06 18:51
Subsystems: mm
[Documentation on labels]
Reported-by: syzbot+17a207d226b8a5fb0fd9@syzkaller.appspotmail.com
First crash: 177d, last: 2d05h
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly mm report (Jan 2024) 0 (1) 2024/01/17 09:21
[syzbot] [mm?] kernel BUG in filemap_unaccount_folio 3 (5) 2023/09/15 18:18
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 kernel BUG in filemap_unaccount_folio origin:upstream C 2 33d 75d 0/3 upstream: reported C repro on 2023/12/13 08:56
upstream kernel BUG in __filemap_get_folio kernel C done 814 507d 677d 22/26 fixed on 2023/02/24 13:50
Last patch testing requests (10)
Created Duration User Patch Repo Result
2024/02/25 01:17 17m retest repro upstream report log
2024/02/09 09:37 14m retest repro linux-next report log
2024/02/09 09:37 14m retest repro linux-next report log
2024/01/14 08:51 27m retest repro upstream report log
2023/12/31 02:48 26m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2023/12/31 02:44 16m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2023/12/17 00:18 28m retest repro upstream report log
2023/12/17 00:18 45m retest repro upstream report log
2023/12/17 00:18 28m retest repro upstream report log
2023/12/17 00:18 28m retest repro upstream report log
Cause bisection attempts (2)
Created Duration User Patch Repo Result
2023/09/15 06:39 11h37m bisect upstream job log (1) log
marked invalid by tatashin@google.com
2023/09/07 11:02 12h15m bisect upstream error job log (0)
marked invalid by nogikh@google.com

Sample crash report:
 tlb_batch_pages_flush+0x9a/0x190 mm/mmu_gather.c:98
 tlb_flush_mmu_free mm/mmu_gather.c:293 [inline]
 tlb_flush_mmu mm/mmu_gather.c:300 [inline]
 tlb_finish_mmu+0x14b/0x6f0 mm/mmu_gather.c:392
 exit_mmap+0x38b/0xa70 mm/mmap.c:3321
 __mmput+0x12a/0x4d0 kernel/fork.c:1349
 mmput+0x62/0x70 kernel/fork.c:1371
 exit_mm kernel/exit.c:567 [inline]
 do_exit+0x9ad/0x2ae0 kernel/exit.c:858
 do_group_exit+0xd4/0x2a0 kernel/exit.c:1021
 __do_sys_exit_group kernel/exit.c:1032 [inline]
 __se_sys_exit_group kernel/exit.c:1030 [inline]
 __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1030
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
------------[ cut here ]------------
kernel BUG at mm/filemap.c:152!
invalid opcode: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 5067 Comm: syz-executor128 Not tainted 6.7.0-rc3-syzkaller-00284-g815fb87b7530 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
RIP: 0010:filemap_unaccount_folio+0x631/0x880 mm/filemap.c:152
Code: 85 6b 01 00 00 8b 6b 5c 31 ff 89 ee e8 28 95 d1 ff 85 ed 7e 17 e8 af 99 d1 ff 48 c7 c6 40 56 d7 8a 48 89 df e8 30 6a 10 00 90 <0f> 0b e8 98 99 d1 ff 48 8d 6b 58 be 04 00 00 00 48 89 ef e8 77 46
RSP: 0018:ffffc900039af840 EFLAGS: 00010093
RAX: 0000000000000000 RBX: ffffea0002e61f00 RCX: ffffc900039af6a0
RDX: ffff888074585940 RSI: ffffffff81b5f0a0 RDI: ffffffff8b2f0d60
RBP: 0000000000000000 R08: 0000000000000000 R09: fffffbfff1e32772
R10: ffffffff8f193b97 R11: 0000000000000001 R12: ffff888028af3198
R13: 0000000000000001 R14: 0000000000000000 R15: ffffea0002e61f18
FS:  00005555571ac380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8d8a0a70d0 CR3: 00000000270b5000 CR4: 0000000000350ef0
Call Trace:
 <TASK>
 __filemap_remove_folio+0x10d/0x740 mm/filemap.c:221
 filemap_remove_folio+0xca/0x210 mm/filemap.c:254
 truncate_inode_folio+0x49/0x70 mm/truncate.c:195
 shmem_undo_range+0x35d/0x1030 mm/shmem.c:1000
 shmem_truncate_range mm/shmem.c:1096 [inline]
 shmem_evict_inode+0x39f/0xba0 mm/shmem.c:1224
 evict+0x2ed/0x6b0 fs/inode.c:666
 iput_final fs/inode.c:1777 [inline]
 iput.part.0+0x560/0x7b0 fs/inode.c:1803
 iput+0x5c/0x80 fs/inode.c:1793
 dentry_unlink_inode+0x292/0x430 fs/dcache.c:401
 __dentry_kill+0x3b8/0x640 fs/dcache.c:607
 dentry_kill fs/dcache.c:733 [inline]
 dput+0x7eb/0xd90 fs/dcache.c:913
 __fput+0x3b9/0xbb0 fs/file_table.c:402
 __fput_sync+0x47/0x50 fs/file_table.c:475
 __do_sys_close fs/open.c:1590 [inline]
 __se_sys_close fs/open.c:1575 [inline]
 __x64_sys_close+0x87/0xf0 fs/open.c:1575
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f8d8a02fa90
Code: ff f7 d8 64 89 02 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 80 3d f1 85 07 00 00 74 17 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c
RSP: 002b:00007ffc74e7f3c8 EFLAGS: 00000202 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f8d8a02fa90
RDX: 0000000000000000 RSI: 0000000000004000 RDI: 0000000000000003
RBP: 00007ffc74e7f3e0 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000028011 R11: 0000000000000202 R12: 00007f8d8a0a35f0
R13: 00007ffc74e7f5c8 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:filemap_unaccount_folio+0x631/0x880 mm/filemap.c:152
Code: 85 6b 01 00 00 8b 6b 5c 31 ff 89 ee e8 28 95 d1 ff 85 ed 7e 17 e8 af 99 d1 ff 48 c7 c6 40 56 d7 8a 48 89 df e8 30 6a 10 00 90 <0f> 0b e8 98 99 d1 ff 48 8d 6b 58 be 04 00 00 00 48 89 ef e8 77 46
RSP: 0018:ffffc900039af840 EFLAGS: 00010093
RAX: 0000000000000000 RBX: ffffea0002e61f00 RCX: ffffc900039af6a0
RDX: ffff888074585940 RSI: ffffffff81b5f0a0 RDI: ffffffff8b2f0d60
RBP: 0000000000000000 R08: 0000000000000000 R09: fffffbfff1e32772
R10: ffffffff8f193b97 R11: 0000000000000001 R12: ffff888028af3198
R13: 0000000000000001 R14: 0000000000000000 R15: ffffea0002e61f18
FS:  00005555571ac380(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f8d8a0a70d0 CR3: 00000000270b5000 CR4: 0000000000350ef0

Crashes (9):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/02 23:43 upstream 815fb87b7530 f819d6f7 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root kernel BUG in filemap_unaccount_folio
2023/11/23 10:56 upstream 9b6de136b5f0 03e12510 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in filemap_unaccount_folio
2023/11/23 09:12 upstream 9b6de136b5f0 03e12510 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root kernel BUG in filemap_unaccount_folio
2023/11/15 20:45 upstream c42d9eeef8e5 cb976f63 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in filemap_unaccount_folio
2023/09/04 07:15 upstream db906f0ca6bb 696ea0d2 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce kernel BUG in filemap_unaccount_folio
2023/09/02 18:45 upstream 0468be89b3fa 696ea0d2 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce kernel BUG in filemap_unaccount_folio
2024/01/26 07:12 linux-next 01af33cc9894 cc4a4020 .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in filemap_unaccount_folio
2024/01/15 22:33 linux-next 8d04a7e2ee3f 2a7bcc7f .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in filemap_unaccount_folio
2023/10/05 13:08 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 2e530aeb342b b7d7ff54 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in filemap_unaccount_folio
* Struck through repros no longer work on HEAD.