gfs2: fsid=syz:syz.0: first mount done, others may mount gfs2: fsid=syz:syz.0: can't create logd thread: -4 ================================ WARNING: inconsistent lock state 6.10.0-next-20240719-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz.1.2/5206 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff888018328548 (&(&bat_priv->dat.work)->timer){+.?.}-{0:0}, at: touch_wq_lockdep_map kernel/workqueue.c:3876 [inline] ffff888018328548 (&(&bat_priv->dat.work)->timer){+.?.}-{0:0}, at: __flush_workqueue+0x1b0/0x1710 kernel/workqueue.c:3918 {IN-SOFTIRQ-W} state was registered at: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5822 call_timer_fn+0xdd/0x650 kernel/time/timer.c:1789 expire_timers kernel/time/timer.c:1838 [inline] __run_timers kernel/time/timer.c:2417 [inline] __run_timer_base+0x695/0x8e0 kernel/time/timer.c:2428 run_timer_base kernel/time/timer.c:2437 [inline] run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2447 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 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 lock_acquire+0x264/0x550 kernel/locking/lockdep.c:5826 down_write+0x99/0x220 kernel/locking/rwsem.c:1579 i_mmap_lock_write include/linux/fs.h:507 [inline] unlink_file_vma_batch_process+0xa3/0x350 mm/mmap.c:145 unlink_file_vma_batch_add+0xf7/0x1e0 mm/mmap.c:163 free_pgtables+0x577/0x840 mm/memory.c:410 exit_mmap+0x447/0xc80 mm/mmap.c:3423 __mmput+0x115/0x390 kernel/fork.c:1347 exit_mm+0x220/0x310 kernel/exit.c:571 do_exit+0x9b2/0x27f0 kernel/exit.c:869 do_group_exit+0x207/0x2c0 kernel/exit.c:1031 get_signal+0x16a1/0x1740 kernel/signal.c:2917 arch_do_signal_or_restart+0x96/0x830 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:111 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0xc9/0x370 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 92935 hardirqs last enabled at (92935): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (92935): [] _raw_spin_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:202 hardirqs last disabled at (92934): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (92934): [] _raw_spin_lock_irq+0xad/0x120 kernel/locking/spinlock.c:170 softirqs last enabled at (92384): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last enabled at (92384): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last enabled at (92384): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 softirqs last disabled at (92369): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (92369): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (92369): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&bat_priv->dat.work)->timer); lock(&(&bat_priv->dat.work)->timer); *** DEADLOCK *** 1 lock held by syz.1.2/5206: #0: ffff88807a5da0e0 (&type->s_umount_key#54/1){+.+.}-{3:3}, at: alloc_super+0x221/0x9d0 fs/super.c:344 stack backtrace: CPU: 0 UID: 0 PID: 5206 Comm: syz.1.2 Not tainted 6.10.0-next-20240719-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_usage_bug+0x62e/0x8b0 kernel/locking/lockdep.c:4035 valid_state+0x13a/0x1c0 kernel/locking/lockdep.c:4049 mark_lock_irq+0xbb/0xc20 kernel/locking/lockdep.c:4260 mark_lock+0x223/0x360 kernel/locking/lockdep.c:4722 __lock_acquire+0x11b0/0x2050 kernel/locking/lockdep.c:5153 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5822 touch_wq_lockdep_map kernel/workqueue.c:3876 [inline] __flush_workqueue+0x1c9/0x1710 kernel/workqueue.c:3918 drain_workqueue+0xc9/0x3a0 kernel/workqueue.c:4082 destroy_workqueue+0xba/0xc40 kernel/workqueue.c:5781 gfs2_fill_super+0x128a/0x2500 fs/gfs2/ops_fstype.c:1310 get_tree_bdev+0x3f7/0x570 fs/super.c:1624 gfs2_get_tree+0x54/0x220 fs/gfs2/ops_fstype.c:1329 vfs_get_tree+0x90/0x2a0 fs/super.c:1789 do_new_mount+0x2be/0xb40 fs/namespace.c:3472 do_mount fs/namespace.c:3812 [inline] __do_sys_mount fs/namespace.c:4020 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3997 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:0x7f700957725a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 7e 1a 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f700a343e78 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f700a343f00 RCX: 00007f700957725a RDX: 00000000200003c0 RSI: 0000000020037f80 RDI: 00007f700a343ec0 RBP: 00000000200003c0 R08: 00007f700a343f00 R09: 0000000000008000 R10: 0000000000008000 R11: 0000000000000206 R12: 0000000020037f80 R13: 00007f700a343ec0 R14: 0000000000037f59 R15: 0000000020000400 list_del corruption, ffff888018328410->prev is LIST_POISON2 (dead000000000122) ------------[ cut here ]------------ kernel BUG at lib/list_debug.c:61! Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 1 UID: 0 PID: 5206 Comm: syz.1.2 Not tainted 6.10.0-next-20240719-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 RIP: 0010:__list_del_entry_valid_or_report+0x106/0x140 lib/list_debug.c:59 Code: e8 9f 1c d9 06 90 0f 0b 48 c7 c7 c0 b2 20 8c 4c 89 fe e8 8d 1c d9 06 90 0f 0b 48 c7 c7 20 b3 20 8c 4c 89 fe e8 7b 1c d9 06 90 <0f> 0b 48 c7 c7 80 b3 20 8c 4c 89 fe 48 89 d9 e8 66 1c d9 06 90 0f RSP: 0018:ffffc90004417928 EFLAGS: 00010246 RAX: 000000000000004e RBX: dead000000000122 RCX: cc57d1be1f837600 RDX: ffffc90009b99000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: ffff8880183284f8 R08: ffffffff8173f2f9 R09: 1ffffffff1f5fb95 R10: dffffc0000000000 R11: fffffbfff1f5fb96 R12: dffffc0000000000 R13: ffff888018328400 R14: ffff888018329410 R15: ffff888018328410 FS: 00007f700a3446c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe7d9e0e000 CR3: 000000006c498000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __list_del_entry_valid include/linux/list.h:124 [inline] __list_del_entry include/linux/list.h:215 [inline] list_del_rcu include/linux/rculist.h:157 [inline] destroy_workqueue+0x7b3/0xc40 kernel/workqueue.c:5823 gfs2_fill_super+0x128a/0x2500 fs/gfs2/ops_fstype.c:1310 get_tree_bdev+0x3f7/0x570 fs/super.c:1624 gfs2_get_tree+0x54/0x220 fs/gfs2/ops_fstype.c:1329 vfs_get_tree+0x90/0x2a0 fs/super.c:1789 do_new_mount+0x2be/0xb40 fs/namespace.c:3472 do_mount fs/namespace.c:3812 [inline] __do_sys_mount fs/namespace.c:4020 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3997 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:0x7f700957725a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 7e 1a 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f700a343e78 EFLAGS: 00000206 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f700a343f00 RCX: 00007f700957725a RDX: 00000000200003c0 RSI: 0000000020037f80 RDI: 00007f700a343ec0 RBP: 00000000200003c0 R08: 00007f700a343f00 R09: 0000000000008000 R10: 0000000000008000 R11: 0000000000000206 R12: 0000000020037f80 R13: 00007f700a343ec0 R14: 0000000000037f59 R15: 0000000020000400 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__list_del_entry_valid_or_report+0x106/0x140 lib/list_debug.c:59 Code: e8 9f 1c d9 06 90 0f 0b 48 c7 c7 c0 b2 20 8c 4c 89 fe e8 8d 1c d9 06 90 0f 0b 48 c7 c7 20 b3 20 8c 4c 89 fe e8 7b 1c d9 06 90 <0f> 0b 48 c7 c7 80 b3 20 8c 4c 89 fe 48 89 d9 e8 66 1c d9 06 90 0f RSP: 0018:ffffc90004417928 EFLAGS: 00010246 RAX: 000000000000004e RBX: dead000000000122 RCX: cc57d1be1f837600 RDX: ffffc90009b99000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: ffff8880183284f8 R08: ffffffff8173f2f9 R09: 1ffffffff1f5fb95 R10: dffffc0000000000 R11: fffffbfff1f5fb96 R12: dffffc0000000000 R13: ffff888018328400 R14: ffff888018329410 R15: ffff888018328410 FS: 00007f700a3446c0(0000) GS:ffff8880b9400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe7e3f58d60 CR3: 000000006c498000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400