syzbot


WARNING: held lock freed in __flush_workqueue

Status: upstream: reported on 2024/06/17 07:54
Subsystems: gfs2
[Documentation on labels]
Reported-by: syzbot+62f0a214565ddd1969d5@syzkaller.appspotmail.com
First crash: 13d, last: 10d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [gfs2?] WARNING: held lock freed in __flush_workqueue 0 (1) 2024/06/17 07:54

Sample crash report:
=========================
WARNING: held lock freed!
6.10.0-rc3-next-20240611-syzkaller #0 Not tainted
-------------------------
syz-executor.0/7578 is freeing memory ffff88823bdf8000-ffff88823bdf81ff, with a lock still held there!
ffff88823bdf8148 (&x->wait#58){+.+.}-{2:2}, at: touch_wq_lockdep_map kernel/workqueue.c:3895 [inline]
ffff88823bdf8148 (&x->wait#58){+.+.}-{2:2}, at: __flush_workqueue+0x1b0/0x1710 kernel/workqueue.c:3937
3 locks held by syz-executor.0/7578:
 #0: ffff8880221960e0 (&type->s_umount_key#107/1){+.+.}-{3:3}, at: alloc_super+0x221/0x9d0 fs/super.c:344
 #1: ffff88823bdf8148 (&x->wait#58){+.+.}-{2:2}, at: touch_wq_lockdep_map kernel/workqueue.c:3895 [inline]
 #1: ffff88823bdf8148 (&x->wait#58){+.+.}-{2:2}, at: __flush_workqueue+0x1b0/0x1710 kernel/workqueue.c:3937
 #2: ffffffff8e335560 (rcu_callback){....}-{0:0}, at: rcu_lock_acquire include/linux/rcupdate.h:326 [inline]
 #2: ffffffff8e335560 (rcu_callback){....}-{0:0}, at: rcu_do_batch kernel/rcu/tree.c:2558 [inline]
 #2: ffffffff8e335560 (rcu_callback){....}-{0:0}, at: rcu_core+0xa86/0x1830 kernel/rcu/tree.c:2838

stack backtrace:
CPU: 0 PID: 7578 Comm: syz-executor.0 Not tainted 6.10.0-rc3-next-20240611-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:91 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:117
 print_freed_lock_bug kernel/locking/lockdep.c:6607 [inline]
 debug_check_no_locks_freed+0x3ca/0x4b0 kernel/locking/lockdep.c:6642
 slab_free_hook mm/slub.c:2178 [inline]
 slab_free mm/slub.c:4455 [inline]
 kfree+0xfa/0x360 mm/slub.c:4576
 rcu_do_batch kernel/rcu/tree.c:2564 [inline]
 rcu_core+0xafd/0x1830 kernel/rcu/tree.c:2838
 handle_softirqs+0x2c4/0x970 kernel/softirq.c:554
 __do_softirq kernel/softirq.c:588 [inline]
 invoke_softirq kernel/softirq.c:428 [inline]
 __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
 sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:lock_acquire+0x264/0x550 kernel/locking/lockdep.c:5821
Code: 2b 00 74 08 4c 89 f7 e8 1a 18 8a 00 f6 44 24 61 02 0f 85 85 01 00 00 41 f7 c7 00 02 00 00 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 25 00 00 00 00 00 43 c7 44 25 09 00 00 00 00 43 c7 44 25
RSP: 0000:ffffc9000fdcf5c0 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff92001fb9ec4 RCX: e87e0b6d03ed4800
RDX: dffffc0000000000 RSI: ffffffff8bcad320 RDI: ffffffff8c200760
RBP: ffffc9000fdcf708 R08: ffffffff92fcb8ff R09: 1ffffffff25f971f
R10: dffffc0000000000 R11: fffffbfff25f9720 R12: 1ffff92001fb9ec0
R13: dffffc0000000000 R14: ffffc9000fdcf620 R15: 0000000000000246
 touch_wq_lockdep_map kernel/workqueue.c:3895 [inline]
 __flush_workqueue+0x1c9/0x1710 kernel/workqueue.c:3937
 drain_workqueue+0xc9/0x3a0 kernel/workqueue.c:4101
 destroy_workqueue+0xba/0xc40 kernel/workqueue.c:5812
 gfs2_fill_super+0x12a4/0x2520 fs/gfs2/ops_fstype.c:1311
 get_tree_bdev+0x3f7/0x570 fs/super.c:1615
 gfs2_get_tree+0x54/0x220 fs/gfs2/ops_fstype.c:1330
 vfs_get_tree+0x90/0x2a0 fs/super.c:1780
 do_new_mount+0x2be/0xb40 fs/namespace.c:3379
 do_mount fs/namespace.c:3719 [inline]
 __do_sys_mount fs/namespace.c:3925 [inline]
 __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3902
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fe59f07e5aa
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe59fe7eef8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007fe59fe7ef80 RCX: 00007fe59f07e5aa
RDX: 00000000200003c0 RSI: 0000000020037f80 RDI: 00007fe59fe7ef40
RBP: 00000000200003c0 R08: 00007fe59fe7ef80 R09: 0000000000008000
R10: 0000000000008000 R11: 0000000000000202 R12: 0000000020037f80
R13: 00007fe59fe7ef40 R14: 0000000000037f59 R15: 0000000020000400
 </TASK>
----------------
Code disassembly (best guess):
   0:	2b 00                	sub    (%rax),%eax
   2:	74 08                	je     0xc
   4:	4c 89 f7             	mov    %r14,%rdi
   7:	e8 1a 18 8a 00       	call   0x8a1826
   c:	f6 44 24 61 02       	testb  $0x2,0x61(%rsp)
  11:	0f 85 85 01 00 00    	jne    0x19c
  17:	41 f7 c7 00 02 00 00 	test   $0x200,%r15d
  1e:	74 01                	je     0x21
  20:	fb                   	sti
  21:	48 c7 44 24 40 0e 36 	movq   $0x45e0360e,0x40(%rsp)
  28:	e0 45
* 2a:	4b c7 44 25 00 00 00 	movq   $0x0,0x0(%r13,%r12,1) <-- trapping instruction
  31:	00 00
  33:	43 c7 44 25 09 00 00 	movl   $0x0,0x9(%r13,%r12,1)
  3a:	00 00
  3c:	43                   	rex.XB
  3d:	c7                   	.byte 0xc7
  3e:	44                   	rex.R
  3f:	25                   	.byte 0x25

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/15 22:50 linux-next a957267fa7e9 f429ab00 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: held lock freed in __flush_workqueue
2024/06/13 06:41 linux-next a957267fa7e9 2aa5052f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: held lock freed in __flush_workqueue
* Struck through repros no longer work on HEAD.