syzbot


WARNING: held lock freed in do_sync

Status: upstream: reported on 2026/03/18 13:19
Reported-by: syzbot+f6b17c7f3b78b5128802@syzkaller.appspotmail.com
First crash: 24d, last: 24d

Sample crash report:
=========================
WARNING: held lock freed!
syzkaller #0 Not tainted
-------------------------
gfs2_quotad/4426 is freeing memory ffff88805f4a3640-ffff88805f4a3c87, with a lock still held there!
ffff88805f4a3790 (&gfs2_quota_imutex_key){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
ffff88805f4a3790 (&gfs2_quota_imutex_key){+.+.}-{3:3}, at: do_sync+0x35a/0xc40 fs/gfs2/quota.c:919
3 locks held by gfs2_quotad/4426:
 #0: ffff88807b0f4b70 (&sdp->sd_quota_sync_mutex){+.+.}-{3:3}, at: gfs2_quota_sync+0x91/0x700 fs/gfs2/quota.c:1313
 #1: ffff88805f4a3790 (&gfs2_quota_imutex_key){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
 #1: ffff88805f4a3790 (&gfs2_quota_imutex_key){+.+.}-{3:3}, at: do_sync+0x35a/0xc40 fs/gfs2/quota.c:919
 #2: ffffffff8c31ebc0 (rcu_callback){....}-{0:0}, at: rcu_lock_acquire+0x0/0x20

stack backtrace:
CPU: 1 PID: 4426 Comm: gfs2_quotad Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
Call Trace:
 <IRQ>
 dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
 print_freed_lock_bug kernel/locking/lockdep.c:6401 [inline]
 debug_check_no_locks_freed+0x301/0x3e0 kernel/locking/lockdep.c:6434
 slab_free_hook mm/slub.c:1682 [inline]
 slab_free_freelist_hook+0x76/0x170 mm/slub.c:1736
 slab_free mm/slub.c:3504 [inline]
 kmem_cache_free+0x8f/0x210 mm/slub.c:3520
 rcu_do_batch kernel/rcu/tree.c:2523 [inline]
 rcu_core+0x9d2/0x1670 kernel/rcu/tree.c:2763
 handle_softirqs+0x339/0x830 kernel/softirq.c:576
 __do_softirq kernel/softirq.c:610 [inline]
 invoke_softirq kernel/softirq.c:450 [inline]
 __irq_exit_rcu+0x13b/0x230 kernel/softirq.c:659
 irq_exit_rcu+0x5/0x20 kernel/softirq.c:671
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
 sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
RIP: 0010:preempt_schedule_irq+0xb6/0x160 kernel/sched/core.c:6799
Code: 00 00 43 c6 44 37 04 f8 74 0b 0f 0b 48 f7 03 08 00 00 00 74 7f bf 01 00 00 00 e8 85 ae 8d f7 e8 c0 9a ba f7 fb bf 01 00 00 00 <e8> 65 b5 ff ff 43 c6 44 37 08 00 48 c7 44 24 40 00 00 00 00 9c 8f
RSP: 0018:ffffc90002f9f440 EFLAGS: 00000286
RAX: 142f6a9bc7b3dd00 RBX: 0000000000000000 RCX: 142f6a9bc7b3dd00
RDX: dffffc0000000000 RSI: ffffffff8a2b2780 RDI: 0000000000000001
RBP: ffffc90002f9f4e0 R08: ffffffff901d4217 R09: 1ffffffff203a842
R10: dffffc0000000000 R11: fffffbfff203a843 R12: 0000000000000000
R13: 0000000000000000 R14: dffffc0000000000 R15: 1ffff920005f3e88
 irqentry_exit+0x63/0x70 kernel/entry/common.c:432
 asm_sysvec_reschedule_ipi+0x16/0x20 arch/x86/include/asm/idtentry.h:681
RIP: 0010:dump_stack_lvl+0x20e/0x250 lib/dump_stack.c:108
Code: e8 97 9e c4 f7 48 bb 00 00 00 00 00 fc ff df 4d 85 ed 75 07 e8 83 9e c4 f7 eb 06 e8 7c 9e c4 f7 fb 48 c7 44 24 20 0e 36 e0 45 <31> c0 49 89 04 1f 49 89 44 1f 08 65 48 8b 04 25 28 00 00 00 48 3b
RSP: 0018:ffffc90002f9f5a0 EFLAGS: 00000293
RAX: ffffffff89b48294 RBX: dffffc0000000000 RCX: ffff88802c658000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90002f9f690 R08: ffffffff901d4217 R09: 1ffffffff203a842
R10: dffffc0000000000 R11: fffffbfff203a843 R12: dffffc0000000004
R13: 0000000000000200 R14: 0000000000000000 R15: 1ffff920005f3eb8
 gfs2_withdraw+0x1149/0x1490 fs/gfs2/util.c:355
 gfs2_dinode_in fs/gfs2/glops.c:465 [inline]
 gfs2_inode_refresh+0xb64/0xff0 fs/gfs2/glops.c:485
 inode_go_lock+0x127/0x470 fs/gfs2/glops.c:510
 do_promote+0x741/0xab0 fs/gfs2/glock.c:507
 finish_xmote+0x4df/0xb00 fs/gfs2/glock.c:678
 do_xmote+0x7b6/0x1120 fs/gfs2/glock.c:824
 gfs2_glock_nq+0xc7a/0x1550 fs/gfs2/glock.c:1534
 gfs2_glock_nq_init fs/gfs2/glock.h:246 [inline]
 do_sync+0x4ab/0xc40 fs/gfs2/quota.c:927
 gfs2_quota_sync+0x32c/0x700 fs/gfs2/quota.c:1329
 quotad_check_timeo fs/gfs2/quota.c:1519 [inline]
 gfs2_quotad+0x403/0x890 fs/gfs2/quota.c:1586
 kthread+0x436/0x520 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
----------------
Code disassembly (best guess):
   0:	00 00                	add    %al,(%rax)
   2:	43 c6 44 37 04 f8    	movb   $0xf8,0x4(%r15,%r14,1)
   8:	74 0b                	je     0x15
   a:	0f 0b                	ud2
   c:	48 f7 03 08 00 00 00 	testq  $0x8,(%rbx)
  13:	74 7f                	je     0x94
  15:	bf 01 00 00 00       	mov    $0x1,%edi
  1a:	e8 85 ae 8d f7       	call   0xf78daea4
  1f:	e8 c0 9a ba f7       	call   0xf7ba9ae4
  24:	fb                   	sti
  25:	bf 01 00 00 00       	mov    $0x1,%edi
* 2a:	e8 65 b5 ff ff       	call   0xffffb594 <-- trapping instruction
  2f:	43 c6 44 37 08 00    	movb   $0x0,0x8(%r15,%r14,1)
  35:	48 c7 44 24 40 00 00 	movq   $0x0,0x40(%rsp)
  3c:	00 00
  3e:	9c                   	pushf
  3f:	8f                   	.byte 0x8f

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/03/18 13:18 linux-5.15.y 91d48252ad4b 0199f9a1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan WARNING: held lock freed in do_sync
* Struck through repros no longer work on HEAD.