syzbot


kernel BUG in folio_unlock (2)

Status: upstream: reported C repro on 2024/05/02 16:24
Subsystems: btrfs
[Documentation on labels]
Reported-by: syzbot+9e39ac154d8781441e60@syzkaller.appspotmail.com
First crash: 155d, last: 63d
Cause bisection: failed (error log, bisect log)
  
Fix bisection: fixed by (bisect log) :
commit 478574370bef7951fbd9ef5155537d6cbed49472
Author: Boris Burkov <boris@bur.io>
Date: Mon Jul 22 23:49:45 2024 +0000

  btrfs: make cow_file_range_inline() honor locked_page on error

  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] kernel BUG in folio_unlock (2) 2 (5) 2024/09/07 01:25
[syzbot] Monthly btrfs report (Aug 2024) 0 (1) 2024/08/16 09:47
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in folio_unlock mm 1 530d 526d 0/28 auto-obsoleted due to no activity on 2023/06/22 15:13
upstream kernel BUG in __filemap_get_folio kernel C done 814 728d 898d 22/28 fixed on 2023/02/24 13:50
Last patch testing requests (4)
Created Duration User Patch Repo Result
2024/08/16 16:26 41m retest repro upstream OK log
2024/08/16 16:23 29m retest repro linux-next OK log
2024/05/17 05:20 16m retest repro linux-next report log
2024/05/02 23:23 24m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 9c6ecb3cb6e2 OK log

Sample crash report:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1088 [inline]
 free_unref_page+0xd22/0xea0 mm/page_alloc.c:2601
 free_contig_range+0x9e/0x160 mm/page_alloc.c:6655
 destroy_args+0x8a/0x890 mm/debug_vm_pgtable.c:1037
 debug_vm_pgtable+0x4be/0x550 mm/debug_vm_pgtable.c:1417
 do_one_initcall+0x248/0x880 init/main.c:1265
 do_initcall_level+0x157/0x210 init/main.c:1327
 do_initcalls+0x3f/0x80 init/main.c:1343
 kernel_init_freeable+0x435/0x5d0 init/main.c:1576
 kernel_init+0x1d/0x2b0 init/main.c:1465
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
------------[ cut here ]------------
kernel BUG at mm/filemap.c:1507!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 PID: 5109 Comm: syz-executor359 Not tainted 6.9.0-rc6-next-20240502-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:folio_unlock+0x18b/0x2f0 mm/filemap.c:1507
Code: 4c 89 f0 48 25 ff 0f 00 00 74 62 e8 bf df c9 ff e9 eb fe ff ff e8 b5 df c9 ff 4c 89 f7 48 c7 c6 a0 85 d3 8b e8 96 95 13 00 90 <0f> 0b e8 9e df c9 ff 4c 89 f7 48 c7 c6 a0 8e d3 8b e8 7f 95 13 00
RSP: 0018:ffffc900036b6b48 EFLAGS: 00010246
RAX: 85f60d17a1306500 RBX: 1ffffd40003a3d50 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: ffffffff8bcab340 RDI: 0000000000000001
RBP: 00fff4000000402c R08: ffffffff92faa657 R09: 1ffffffff25f54ca
R10: dffffc0000000000 R11: fffffbfff25f54cb R12: ffffea0001d1ea88
R13: 1ffffd40003a3d51 R14: ffffea0001d1ea80 R15: dffffc0000000000
FS:  00007f5d709cb6c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5d70a710d0 CR3: 000000002e66e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __extent_writepage fs/btrfs/extent_io.c:1519 [inline]
 extent_write_cache_pages fs/btrfs/extent_io.c:2173 [inline]
 btrfs_writepages+0x1fab/0x26f0 fs/btrfs/extent_io.c:2294
 do_writepages+0x359/0x870 mm/page-writeback.c:2633
 filemap_fdatawrite_wbc+0x125/0x180 mm/filemap.c:397
 __filemap_fdatawrite_range mm/filemap.c:430 [inline]
 filemap_fdatawrite_range+0x120/0x180 mm/filemap.c:448
 btrfs_fdatawrite_range fs/btrfs/file.c:4050 [inline]
 start_ordered_ops fs/btrfs/file.c:1753 [inline]
 btrfs_sync_file+0x2b4/0xf80 fs/btrfs/file.c:1828
 generic_write_sync include/linux/fs.h:2793 [inline]
 btrfs_do_write_iter+0xb84/0x10a0 fs/btrfs/file.c:1705
 iter_file_splice_write+0xbd7/0x14e0 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x11e/0x220 fs/splice.c:1164
 splice_direct_to_actor+0x58e/0xc90 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0x28c/0x3e0 fs/splice.c:1233
 vfs_copy_file_range+0xd37/0x1510 fs/read_write.c:1558
 __do_sys_copy_file_range fs/read_write.c:1612 [inline]
 __se_sys_copy_file_range+0x3f2/0x5d0 fs/read_write.c:1575
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5d70a356c9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 81 18 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5d709cb208 EFLAGS: 00000246 ORIG_RAX: 0000000000000146
RAX: ffffffffffffffda RBX: 00007f5d70ac1618 RCX: 00007f5d70a356c9
RDX: 0000000000000004 RSI: 0000000000000000 RDI: 0000000000000005
RBP: 00007f5d70ac1610 R08: ffffffffa003e45b R09: 0700000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f5d70a8e1b0
R13: 007570637265705f R14: 6f6f6c2f7665642f R15: 0700000000000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:folio_unlock+0x18b/0x2f0 mm/filemap.c:1507
Code: 4c 89 f0 48 25 ff 0f 00 00 74 62 e8 bf df c9 ff e9 eb fe ff ff e8 b5 df c9 ff 4c 89 f7 48 c7 c6 a0 85 d3 8b e8 96 95 13 00 90 <0f> 0b e8 9e df c9 ff 4c 89 f7 48 c7 c6 a0 8e d3 8b e8 7f 95 13 00
RSP: 0018:ffffc900036b6b48 EFLAGS: 00010246
RAX: 85f60d17a1306500 RBX: 1ffffd40003a3d50 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: ffffffff8bcab340 RDI: 0000000000000001
RBP: 00fff4000000402c R08: ffffffff92faa657 R09: 1ffffffff25f54ca
R10: dffffc0000000000 R11: fffffbfff25f54cb R12: ffffea0001d1ea88
R13: 1ffffd40003a3d51 R14: ffffea0001d1ea80 R15: dffffc0000000000
FS:  00007f5d709cb6c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5d70a710d0 CR3: 000000002e66e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (86):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/02 16:11 linux-next 9c6ecb3cb6e2 3ba885bc .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2024/07/08 08:10 upstream 256abd8e550c 2a40360c .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] [mounted in repro #3] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/20 06:19 upstream 4305ca0087dd 890ce4f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/19 05:41 upstream 720261cfc732 ee4e11c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/17 05:56 upstream 0434dbe32053 215bec2d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/11 11:57 upstream 9d9a2f29aefd c699c2eb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/10 21:37 upstream a19ea421490d 6f7fa383 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/10 16:02 upstream 34afb82a3c67 6f7fa383 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/10 08:53 upstream 34afb82a3c67 bc144f9a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/10 08:37 upstream 34afb82a3c67 bc144f9a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/08 05:56 upstream 256abd8e550c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/07 23:07 upstream c6653f49e4fd 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/07 07:21 upstream 22f902dfc51e 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/06 05:05 upstream d270dd21bee0 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in folio_unlock
2024/07/06 00:11 upstream d270dd21bee0 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/04 01:31 upstream 8a9c6c40432e f76a75f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/04 01:19 upstream 8a9c6c40432e f76a75f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/04 01:15 upstream 8a9c6c40432e f76a75f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/04 01:14 upstream 8a9c6c40432e f76a75f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/04 01:09 upstream 8a9c6c40432e f76a75f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/04 01:08 upstream 8a9c6c40432e f76a75f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/04 01:08 upstream 8a9c6c40432e f76a75f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/04 01:07 upstream 8a9c6c40432e f76a75f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/04 01:06 upstream 8a9c6c40432e f76a75f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/04 01:02 upstream 8a9c6c40432e f76a75f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/04 00:52 upstream 8a9c6c40432e f76a75f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/04 00:30 upstream 8a9c6c40432e f76a75f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/03 23:05 upstream 8a9c6c40432e f76a75f3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/07/02 04:21 upstream 73e931504f8e b294e901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in folio_unlock
2024/06/16 07:14 upstream 2ccbdf43d5e7 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in folio_unlock
2024/06/16 07:13 upstream 2ccbdf43d5e7 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in folio_unlock
2024/06/16 07:10 upstream 2ccbdf43d5e7 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in folio_unlock
2024/06/16 07:06 upstream 2ccbdf43d5e7 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in folio_unlock
2024/06/16 06:50 upstream 2ccbdf43d5e7 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root kernel BUG in folio_unlock
2024/05/20 14:19 upstream eb6a9339efeb c0f1611a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root kernel BUG in folio_unlock
2024/06/23 00:13 upstream 563a50672d8a c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in folio_unlock
2024/05/20 17:37 upstream 6e51b4b5bbc0 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream kernel BUG in folio_unlock
2024/06/19 14:17 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in folio_unlock
2024/06/18 09:28 upstream 2ccbdf43d5e7 c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in folio_unlock
2024/05/31 15:13 upstream 4a4be1ad3a6e c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in folio_unlock
2024/05/31 05:01 upstream 4a4be1ad3a6e c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in folio_unlock
2024/05/31 05:01 upstream 4a4be1ad3a6e c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in folio_unlock
2024/05/31 02:30 upstream 4a4be1ad3a6e c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in folio_unlock
2024/05/31 02:30 upstream 4a4be1ad3a6e c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in folio_unlock
2024/05/30 07:35 upstream 4a4be1ad3a6e c2e07261 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 kernel BUG in folio_unlock
2024/06/16 20:44 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2024/06/16 20:35 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root kernel BUG in folio_unlock
2024/08/02 15:32 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in folio_unlock
2024/07/31 15:33 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 6fde257d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in folio_unlock
2024/07/28 18:29 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in folio_unlock
2024/07/21 22:36 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 b88348e9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in folio_unlock
2024/07/21 17:42 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 b88348e9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in folio_unlock
2024/07/20 09:30 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 b88348e9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in folio_unlock
2024/07/14 23:59 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci c912bf709078 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in folio_unlock
2024/07/05 06:57 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 8e2f4becf4fa dc6bbff0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in folio_unlock
* Struck through repros no longer work on HEAD.