BUG: spinlock bad magic in btrfs_encoded_read_endio

Status: upstream: reported C repro on 2026/03/20 05:11
Reported-by: syzbot+7f7402e6db0d5687291e@syzkaller.appspotmail.com
First crash: 254d, last: 1h36m
▶ ▼ Similar bugs (5)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 BUG: spinlock bad magic in release_metapage origin:upstream 19 syz, C error 103 3h06m 805d 0/3 upstream: reported C repro on 2024/09/15 11:43
upstream BUG: spinlock bad magic in gadget_dev_open prio:normal usb 4 15 20d 109d 0/30 upstream: reported on 2026/08/12 22:54
linux-6.6 BUG: spinlock bad magic in release_metapage origin:upstream 4 syz, C error 15 56m 369d 0/2 upstream: reported C repro on 2025/11/25 20:12
linux-6.1 BUG: spinlock bad magic in release_metapage origin:upstream 4 syz, C error 93 41d 786d 0/3 upstream: reported C repro on 2024/10/04 04:01
upstream BUG: spinlock bad magic in release_metapage prio:high jfs 15 syz, C inconclusive 882 1d06h 810d 0/30 upstream: reported C repro on 2024/09/10 08:16

Sample crash report:
EXT4-fs (loop0): mounted filesystem without journal. Quota mode: writeback.
OCFS2: ERROR (device loop0): int ocfs2_read_quota_block(struct inode *, u64, struct buffer_head **): Quota file 0 is probably corrupted! Requested to read block 0 but file has size only 10
BUG: spinlock bad magic on CPU#0, syz.0.17/4506
 lock: 0xffff0000d4910100, .magic: 00000000, .owner: : bits:%lx > %s
/0, .owner_cpu: 0
CPU: 0 PID: 4506 Comm: syz.0.17 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call trace:
 dump_backtrace+0x1c4/0x1f0 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack+0x30/0x40 lib/dump_stack.c:88
 dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106
 dump_stack+0x1c/0x5c lib/dump_stack.c:113
 spin_dump+0x110/0x1fc kernel/locking/spinlock_debug.c:69
 spin_bug kernel/locking/spinlock_debug.c:77 [inline]
 debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline]
 do_raw_spin_lock+0x1ec/0x2f8 kernel/locking/spinlock_debug.c:114
 __raw_spin_lock include/linux/spinlock_api_smp.h:134 [inline]
 _raw_spin_lock+0x5c/0x6c kernel/locking/spinlock.c:154
 spin_lock include/linux/spinlock.h:351 [inline]
 ocfs2_set_osb_flag fs/ocfs2/ocfs2.h:616 [inline]
 ocfs2_handle_error+0x50/0x21c fs/ocfs2/super.c:2543
 __ocfs2_error+0x10c/0x168 fs/ocfs2/super.c:2583
 ocfs2_read_quota_block+0x1f8/0x350 fs/ocfs2/quota_local.c:141
 ocfs2_local_check_quota_file+0x100/0xbac fs/ocfs2/quota_local.c:175
 dquot_load_quota_sb+0x564/0x998 fs/quota/dquot.c:2488
 dquot_load_quota_inode+0x274/0x4dc fs/quota/dquot.c:2532
 dquot_quota_on+0xe8/0x10c fs/quota/dquot.c:2584
 ext4_quota_on+0x390/0x858 fs/ext4/super.c:7019
 quota_quotaon+0x110/0x15c fs/quota/quota.c:95
 do_quotactl+0x4cc/0x738 fs/quota/quota.c:788
 __do_sys_quotactl fs/quota/quota.c:960 [inline]
 __se_sys_quotactl fs/quota/quota.c:916 [inline]
 __arm64_sys_quotactl+0x2dc/0x77c fs/quota/quota.c:916
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140
 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204
 el0_svc+0x58/0x12c arch/arm64/kernel/entry-common.c:638
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:656
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:589
On-disk corruption discovered. Please run fsck.ocfs2 once the filesystem is unmounted.
OCFS2: File system is now read-only.
(syz.0.17,4506,0):ocfs2_local_check_quota_file:177 ERROR: status = -30
(syz.0.17,4506,0):ocfs2_local_check_quota_file:179 ERROR: failed to read quota file header (type=1)

Crashes (15):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/25 22:04 linux-6.1.y 1ca1436ccc68 01ff072a .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-linux-6-1-kasan-arm64 BUG: spinlock bad magic in ocfs2_handle_error
2026/09/16 06:37 linux-6.1.y 1a8763b93150 12a0a44a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: spinlock bad magic in btrfs_encoded_read_endio
2026/06/24 14:48 linux-6.1.y fdb6fcb41cc7 302586aa .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: spinlock bad magic in btrfs_encoded_read_endio
2026/03/20 17:50 linux-6.1.y f2ddafa93a25 ac6f1dff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: spinlock bad magic in btrfs_encoded_read_endio
2026/03/20 05:10 linux-6.1.y f2ddafa93a25 2f245add .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: spinlock bad magic in btrfs_encoded_read_endio
2026/05/16 19:09 linux-6.1.y c27210688955 a15a64a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: spinlock bad magic in btrfs_encoded_read_endio
2026/05/06 13:23 linux-6.1.y 4931e0e1673d 1dddfd3d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: spinlock bad magic in btrfs_encoded_read_endio
2026/11/30 01:21 linux-6.1.y 1ca1436ccc68 e1f06033 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: spinlock bad magic in ocfs2_handle_error
2026/11/25 23:27 linux-6.1.y 1ca1436ccc68 01ff072a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: spinlock bad magic in ocfs2_handle_error
2026/11/19 14:27 linux-6.1.y c75b0cf0982c f138241c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan BUG: spinlock bad magic in ocfs2_handle_error
2026/11/29 21:49 linux-6.1.y 1ca1436ccc68 e1f06033 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: spinlock bad magic in ocfs2_handle_error
2026/11/29 21:48 linux-6.1.y 1ca1436ccc68 e1f06033 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: spinlock bad magic in ocfs2_handle_error
2026/11/26 17:02 linux-6.1.y 1ca1436ccc68 1c78e8c0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: spinlock bad magic in ocfs2_handle_error
2026/11/26 09:38 linux-6.1.y 1ca1436ccc68 9a575fe5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: spinlock bad magic in ocfs2_handle_error
2026/11/25 20:26 linux-6.1.y 1ca1436ccc68 01ff072a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 BUG: spinlock bad magic in ocfs2_handle_error
* Struck through repros no longer work on HEAD.