kernel BUG in wait_subpage_spinlock

Status: upstream: reported on 2026/09/22 19:05
Subsystems: btrfs
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+d6f123d4060990f0f3ff@syzkaller.appspotmail.com
First crash: 65d, last: 2d07h
▶ ▼ ✨ AI Jobs (3)
ID Workflow Result Correct Bug Created Started Finished Revision
d23c1877 repro-c 💥 kernel BUG in wait_subpage_spinlock 2026/09/29 05:12 2026/09/29 05:12 2026/09/29 08:38 7bf4ea23
be5b687f repro-c 💥 kernel BUG in wait_subpage_spinlock 2026/09/27 11:41 2026/09/27 11:41 2026/09/27 18:33 a3c7249d
308b7a1c assessment-security DenialOfService: ✅ Exploitable: ❌ FilesystemTrigger: ❌ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ✅ UserNamespace: ❌ VMGuestTrigger: ❌ VMHostTrigger: ❌ ❓ kernel BUG in wait_subpage_spinlock 2026/09/20 00:00 2026/09/20 00:00 2026/09/20 01:07 853b104b
▶ ▼ Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [btrfs?] kernel BUG in wait_subpage_spinlock 0 (1) 2026/09/22 19:05

Sample crash report:
assertion failed: folio_test_private(folio) && folio_get_private(folio), in fs/btrfs/inode.c:7573
------------[ cut here ]------------
kernel BUG at fs/btrfs/inode.c:7573!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5352 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
RIP: 0010:wait_subpage_spinlock+0x2c5/0x2d0 fs/btrfs/inode.c:7573
Code: f9 fc 90 0f 0b e8 0b a6 9a fd 48 c7 c7 00 ad 7a 8c 48 c7 c6 40 e1 7a 8c 48 c7 c2 e0 ad 7a 8c b9 95 1d 00 00 e8 fc 1c f9 fc 90 <0f> 0b 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc9000e1373e8 EFLAGS: 00010246
RAX: 0000000000000061 RBX: 0000000000000000 RCX: c58f91d02fbb1500
RDX: 0000000000000000 RSI: 8000000000000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffc9000e137167 R09: 1ffff92001c26e2c
R10: dffffc0000000000 R11: fffff52001c26e2d R12: 0000000000004000
R13: ffff888042234208 R14: 0000000000001000 R15: 0000000000000002
FS:  00005555623f1540(0000) GS:ffff88808a9ed000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fda0b621398 CR3: 00000000134d9000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 btrfs_invalidate_folio+0x26e/0xc50 fs/btrfs/inode.c:7655
 extent_writepage fs/btrfs/extent_io.c:2049 [inline]
 extent_write_cache_pages fs/btrfs/extent_io.c:2834 [inline]
 btrfs_writepages+0x12a4/0x2830 fs/btrfs/extent_io.c:2966
 do_writepages+0x338/0x560 mm/page-writeback.c:2562
 filemap_writeback mm/filemap.c:386 [inline]
 filemap_flush_range mm/filemap.c:435 [inline]
 filemap_flush+0x1e1/0x2e0 mm/filemap.c:450
 btrfs_release_file+0x10a/0x130 fs/btrfs/file.c:1469
 __fput+0x408/0xa40 fs/file_table.c:512
 fput_close_sync+0x11f/0x240 fs/file_table.c:618
 filp_close_sync+0x6e/0xa0 fs/open.c:1574
 __range_close fs/file.c:919 [inline]
 __do_sys_close_range fs/file.c:1003 [inline]
 __se_sys_close_range+0xa77/0xef0 fs/file.c:954
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fda0b3a9559
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:00007ffeb1ca55b8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: ffffffffffffffda RBX: 00007fda0b627da0 RCX: 00007fda0b3a9559
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007fda0b627da0 R08: 0000000000000006 R09: 0000000000000000
R10: 00007fda0b627cb0 R11: 0000000000000246 R12: 000000000001bf4e
R13: 00007fda0b625fac R14: 000000000001bee8 R15: 00007ffeb1ca56c0
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:wait_subpage_spinlock+0x2c5/0x2d0 fs/btrfs/inode.c:7573
Code: f9 fc 90 0f 0b e8 0b a6 9a fd 48 c7 c7 00 ad 7a 8c 48 c7 c6 40 e1 7a 8c 48 c7 c2 e0 ad 7a 8c b9 95 1d 00 00 e8 fc 1c f9 fc 90 <0f> 0b 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc9000e1373e8 EFLAGS: 00010246
RAX: 0000000000000061 RBX: 0000000000000000 RCX: c58f91d02fbb1500
RDX: 0000000000000000 RSI: 8000000000000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffc9000e137167 R09: 1ffff92001c26e2c
R10: dffffc0000000000 R11: fffff52001c26e2d R12: 0000000000004000
R13: ffff888042234208 R14: 0000000000001000 R15: 0000000000000002
FS:  00005555623f1540(0000) GS:ffff88808a9ed000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffce98b1918 CR3: 00000000134d9000 CR4: 0000000000352ef0

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/21 04:17 upstream 5f22fb20497f b2c69459 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in wait_subpage_spinlock
2026/10/30 18:08 upstream d89e1d186ec9 0ec395f8 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in wait_subpage_spinlock
2026/09/18 18:57 upstream 5dd1818b15d9 853b104b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in wait_subpage_spinlock
* Struck through repros no longer work on HEAD.