================================ WARNING: inconsistent lock state 6.11.0-rc1-next-20240729-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz.0.9/5326 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff88801f132548 (&(&bat_priv->dat.work)->timer){+.?.}-{0:0}, at: touch_wq_lockdep_map kernel/workqueue.c:3876 [inline] ffff88801f132548 (&(&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 console_flush_all+0x9f7/0xf50 console_unlock+0x13b/0x4d0 kernel/printk/printk.c:3173 vprintk_emit+0x7a1/0x900 kernel/printk/printk.c:2423 _printk+0xd5/0x120 kernel/printk/printk.c:2450 set_capacity_and_notify+0x1ae/0x240 block/genhd.c:86 loop_set_size+0x44/0xb0 drivers/block/loop.c:232 loop_configure+0x9fb/0xec0 drivers/block/loop.c:1102 lo_ioctl+0x849/0x1f60 blkdev_ioctl+0x580/0x6b0 block/ioctl.c:676 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:893 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 irq event stamp: 90247 hardirqs last enabled at (90247): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (90247): [] _raw_spin_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:202 hardirqs last disabled at (90246): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (90246): [] _raw_spin_lock_irq+0xad/0x120 kernel/locking/spinlock.c:170 softirqs last enabled at (89564): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last enabled at (89564): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last enabled at (89564): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 softirqs last disabled at (89357): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (89357): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (89357): [] __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.0.9/5326: #0: ffff88801cb600e0 (&type->s_umount_key#49/1){+.+.}-{3:3}, at: alloc_super+0x221/0x9d0 fs/super.c:344 stack backtrace: CPU: 1 UID: 0 PID: 5326 Comm: syz.0.9 Not tainted 6.11.0-rc1-next-20240729-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:1635 gfs2_get_tree+0x54/0x220 fs/gfs2/ops_fstype.c:1329 vfs_get_tree+0x90/0x2a0 fs/super.c:1800 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:0x7f8b62978aba 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:00007f8b6371ae78 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f8b6371af00 RCX: 00007f8b62978aba RDX: 00000000200124c0 RSI: 0000000020012500 RDI: 00007f8b6371aec0 RBP: 00000000200124c0 R08: 00007f8b6371af00 R09: 0000000000000400 R10: 0000000000000400 R11: 0000000000000202 R12: 0000000020012500 R13: 00007f8b6371aec0 R14: 00000000000124ab R15: 0000000020000240 list_del corruption, ffff88801f132410->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: 0 UID: 0 PID: 5326 Comm: syz.0.9 Not tainted 6.11.0-rc1-next-20240729-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 ff f6 fd 06 90 0f 0b 48 c7 c7 20 80 60 8c 4c 89 fe e8 ed f6 fd 06 90 0f 0b 48 c7 c7 80 80 60 8c 4c 89 fe e8 db f6 fd 06 90 <0f> 0b 48 c7 c7 e0 80 60 8c 4c 89 fe 48 89 d9 e8 c6 f6 fd 06 90 0f RSP: 0018:ffffc9000412f928 EFLAGS: 00010246 RAX: 000000000000004e RBX: dead000000000122 RCX: 2eff0ccb2880fa00 RDX: ffffc90009841000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: ffff88801f1324f8 R08: ffffffff8173f339 R09: fffffbfff1cf9f90 R10: dffffc0000000000 R11: fffffbfff1cf9f90 R12: dffffc0000000000 R13: ffff88801f132400 R14: ffff88802f1a4810 R15: ffff88801f132410 FS: 00007f8b6371b6c0(0000) GS:ffff8880b9200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fb251f5a520 CR3: 0000000029b44000 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:1635 gfs2_get_tree+0x54/0x220 fs/gfs2/ops_fstype.c:1329 vfs_get_tree+0x90/0x2a0 fs/super.c:1800 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:0x7f8b62978aba 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:00007f8b6371ae78 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f8b6371af00 RCX: 00007f8b62978aba RDX: 00000000200124c0 RSI: 0000000020012500 RDI: 00007f8b6371aec0 RBP: 00000000200124c0 R08: 00007f8b6371af00 R09: 0000000000000400 R10: 0000000000000400 R11: 0000000000000202 R12: 0000000020012500 R13: 00007f8b6371aec0 R14: 00000000000124ab R15: 0000000020000240 Modules linked in: ---[ end trace 0000000000000000 ]--- RIP: 0010:__list_del_entry_valid_or_report+0x106/0x140 lib/list_debug.c:59 Code: e8 ff f6 fd 06 90 0f 0b 48 c7 c7 20 80 60 8c 4c 89 fe e8 ed f6 fd 06 90 0f 0b 48 c7 c7 80 80 60 8c 4c 89 fe e8 db f6 fd 06 90 <0f> 0b 48 c7 c7 e0 80 60 8c 4c 89 fe 48 89 d9 e8 c6 f6 fd 06 90 0f RSP: 0018:ffffc9000412f928 EFLAGS: 00010246 RAX: 000000000000004e RBX: dead000000000122 RCX: 2eff0ccb2880fa00 RDX: ffffc90009841000 RSI: 000000000003ffff RDI: 0000000000040000 RBP: ffff88801f1324f8 R08: ffffffff8173f339 R09: fffffbfff1cf9f90 R10: dffffc0000000000 R11: fffffbfff1cf9f90 R12: dffffc0000000000 R13: ffff88801f132400 R14: ffff88802f1a4810 R15: ffff88801f132410 FS: 00007f8b6371b6c0(0000) GS:ffff8880b9200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fb251f5a520 CR3: 0000000029b44000 CR4: 00000000003506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400