syzbot


BUG: sleeping function called from invalid context in lockref_get_not_dead

Status: upstream: reported C repro on 2026/04/15 11:37
Subsystems: gfs2
[Documentation on labels]
Reported-by: syzbot+642d0561f78362d67d3f@syzkaller.appspotmail.com
First crash: 2d21h, last: 12h08m
Cause bisection: failed (error log, bisect log)
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [gfs2?] BUG: sleeping function called from invalid context in lockref_get_not_dead 0 (1) 2026/04/15 11:37

Sample crash report:
gfs2: fsid=syz:syz.0: first mount done, others may mount
BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 6017, name: syz.0.17
preempt_count: 1, expected: 0
RCU nest depth: 1, expected: 1
4 locks held by syz.0.17/6017:
 #0: ffff888035b200d0 (&type->s_umount_key#54/1){+.+.}-{4:4}, at: alloc_super+0x28c/0xac0 fs/super.c:345
 #1: ffffffff8e620a78 (qd_lock){+.+.}-{3:3}, at: spin_lock include/linux/spinlock_rt.h:45 [inline]
 #1: ffffffff8e620a78 (qd_lock){+.+.}-{3:3}, at: gfs2_quota_init+0x854/0x1220 fs/gfs2/quota.c:1459
 #2: ffffffff8dfc8100 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:300 [inline]
 #2: ffffffff8dfc8100 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
 #2: ffffffff8dfc8100 (rcu_read_lock){....}-{1:3}, at: __rt_spin_lock kernel/locking/spinlock_rt.c:50 [inline]
 #2: ffffffff8dfc8100 (rcu_read_lock){....}-{1:3}, at: rt_spin_lock+0x1e0/0x400 kernel/locking/spinlock_rt.c:57
 #3: ffff88805d082b78 (&lockref->lock#3){+.+.}-{3:3}, at: spin_lock include/linux/spinlock_rt.h:45 [inline]
 #3: ffff88805d082b78 (&lockref->lock#3){+.+.}-{3:3}, at: lockref_get_not_dead+0x28/0xd0 lib/lockref.c:155
Preemption disabled at:
[<ffffffff841e0f2b>] bit_spin_lock include/linux/bit_spinlock.h:38 [inline]
[<ffffffff841e0f2b>] hlist_bl_lock include/linux/list_bl.h:149 [inline]
[<ffffffff841e0f2b>] spin_lock_bucket+0x3b/0x150 fs/gfs2/quota.c:98
CPU: 1 UID: 0 PID: 6017 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT_{RT,(full)} 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 __might_resched+0x329/0x480 kernel/sched/core.c:9162
 __rt_spin_lock kernel/locking/spinlock_rt.c:48 [inline]
 rt_spin_lock+0xc2/0x400 kernel/locking/spinlock_rt.c:57
 spin_lock include/linux/spinlock_rt.h:45 [inline]
 lockref_get_not_dead+0x28/0xd0 lib/lockref.c:155
 gfs2_qd_search_bucket+0x139/0x210 fs/gfs2/quota.c:269
 gfs2_quota_init+0x86c/0x1220 fs/gfs2/quota.c:1461
 gfs2_make_fs_rw+0x143/0x230 fs/gfs2/super.c:149
 gfs2_fill_super+0x1bfd/0x2220 fs/gfs2/ops_fstype.c:1275
 get_tree_bdev_flags+0x431/0x4f0 fs/super.c:1694
 gfs2_get_tree+0x51/0x1e0 fs/gfs2/ops_fstype.c:1332
 vfs_get_tree+0x92/0x2a0 fs/super.c:1754
 fc_mount fs/namespace.c:1193 [inline]
 do_new_mount_fc fs/namespace.c:3758 [inline]
 do_new_mount+0x341/0xd30 fs/namespace.c:3834
 do_mount fs/namespace.c:4167 [inline]
 __do_sys_mount fs/namespace.c:4399 [inline]
 __se_sys_mount+0x31d/0x420 fs/namespace.c:4376
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fc2a800da8a
Code: 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007fff3b870ea8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fff3b870f30 RCX: 00007fc2a800da8a
RDX: 00002000000124c0 RSI: 0000200000012500 RDI: 00007fff3b870ef0
RBP: 00002000000124c0 R08: 00007fff3b870f30 R09: 0000000000004800
R10: 0000000000004800 R11: 0000000000000246 R12: 0000200000012500
R13: 00007fff3b870ef0 R14: 00000000000125fd R15: 0000200000000180
 </TASK>
gfs2: fsid=syz:syz.0: Corruption found in quota_change0file: duplicate identifier in slot 48768
gfs2: fsid=syz:syz.0: warning: assertion "!qd->qd_change" failed - function = gfs2_qd_dispose, file = fs/gfs2/quota.c, line = 129
CPU: 1 UID: 0 PID: 6017 Comm: syz.0.17 Tainted: G        W           syzkaller #0 PREEMPT_{RT,(full)} 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 gfs2_assert_warn_i+0x194/0x2c0 fs/gfs2/util.c:304
 gfs2_qd_dispose+0x466/0x570 fs/gfs2/quota.c:129
 gfs2_quota_init+0xcda/0x1220 fs/gfs2/quota.c:1470
 gfs2_make_fs_rw+0x143/0x230 fs/gfs2/super.c:149
 gfs2_fill_super+0x1bfd/0x2220 fs/gfs2/ops_fstype.c:1275
 get_tree_bdev_flags+0x431/0x4f0 fs/super.c:1694
 gfs2_get_tree+0x51/0x1e0 fs/gfs2/ops_fstype.c:1332
 vfs_get_tree+0x92/0x2a0 fs/super.c:1754
 fc_mount fs/namespace.c:1193 [inline]
 do_new_mount_fc fs/namespace.c:3758 [inline]
 do_new_mount+0x341/0xd30 fs/namespace.c:3834
 do_mount fs/namespace.c:4167 [inline]
 __do_sys_mount fs/namespace.c:4399 [inline]
 __se_sys_mount+0x31d/0x420 fs/namespace.c:4376
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x15f/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fc2a800da8a
Code: 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007fff3b870ea8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fff3b870f30 RCX: 00007fc2a800da8a
RDX: 00002000000124c0 RSI: 0000200000012500 RDI: 00007fff3b870ef0
RBP: 00002000000124c0 R08: 00007fff3b870f30 R09: 0000000000004800
R10: 0000000000004800 R11: 0000000000000246 R12: 0000200000012500
R13: 00007fff3b870ef0 R14: 00000000000125fd R15: 0000200000000180
 </TASK>
gfs2: fsid=syz:syz.0: found 1 quota changes

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/04/15 08:09 linux-next e6efabc0afca e2e976a8 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in lockref_get_not_dead
2026/04/16 02:49 linux-next e6efabc0afca df15c5f3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in lockref_get_not_dead
2026/04/14 04:34 linux-next 1c7cc4904160 1a086e7c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in lockref_get_not_dead
2026/04/13 17:36 linux-next 1c7cc4904160 9530ccf9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in lockref_get_not_dead
2026/04/13 17:36 linux-next 1c7cc4904160 9530ccf9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root BUG: sleeping function called from invalid context in lockref_get_not_dead
* Struck through repros no longer work on HEAD.