================================ WARNING: inconsistent lock state 5.19.0-rc4-syzkaller-00208-g69cb6c6556ad #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor636/3615 [HC1[1]:SC0[0]:HE0:SE1] takes: ffffffff8d313c98 (sync_timeline_list_lock){?.+.}-{2:2}, at: sync_timeline_debug_remove+0x28/0x140 drivers/dma-buf/sync_debug.c:31 {HARDIRQ-ON-W} state was registered at: trace_hardirqs_on+0x34/0x40 kernel/trace/trace_preemptirq.c:49 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 spin_unlock_irq include/linux/spinlock.h:399 [inline] sync_print_obj drivers/dma-buf/sync_debug.c:118 [inline] sync_info_debugfs_show+0x17e/0x510 drivers/dma-buf/sync_debug.c:153 seq_read_iter+0x43a/0xd30 fs/seq_file.c:230 seq_read+0x3d4/0x500 fs/seq_file.c:162 vfs_read+0x2ea/0xd10 fs/read_write.c:480 ksys_read+0x19b/0x2c0 fs/read_write.c:620 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 irq event stamp: 9674 hardirqs last enabled at (9673): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (9673): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 hardirqs last disabled at (9674): [] sysvec_irq_work+0xa/0xb0 arch/x86/kernel/irq_work.c:17 softirqs last enabled at (9088): [] __irq_exit_rcu+0xec/0x170 kernel/softirq.c:650 softirqs last disabled at (9063): [] __irq_exit_rcu+0xec/0x170 kernel/softirq.c:650 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(sync_timeline_list_lock); lock(sync_timeline_list_lock); *** DEADLOCK *** no locks held by syz-executor636/3615. stack backtrace: CPU: 1 PID: 3615 Comm: syz-executor636 Not tainted 5.19.0-rc4-syzkaller-00208-g69cb6c6556ad #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 mark_lock_irq+0xb20/0xf00 mark_lock+0x21c/0x350 kernel/locking/lockdep.c:4632 mark_usage kernel/locking/lockdep.c:4524 [inline] __lock_acquire+0xb43/0x1f80 kernel/locking/lockdep.c:5007 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5665 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 sync_timeline_debug_remove+0x28/0x140 drivers/dma-buf/sync_debug.c:31 sync_timeline_free drivers/dma-buf/sw_sync.c:104 [inline] kref_put include/linux/kref.h:65 [inline] sync_timeline_put drivers/dma-buf/sw_sync.c:116 [inline] timeline_fence_release+0x200/0x250 drivers/dma-buf/sw_sync.c:144 kref_put include/linux/kref.h:65 [inline] dma_fence_put include/linux/dma-fence.h:276 [inline] dma_fence_array_release+0x134/0x240 drivers/dma-buf/dma-fence-array.c:120 irq_work_single+0xd3/0x230 kernel/irq_work.c:211 irq_work_run_list kernel/irq_work.c:242 [inline] irq_work_run+0x189/0x350 kernel/irq_work.c:251 __sysvec_irq_work+0x62/0x70 arch/x86/kernel/irq_work.c:22 sysvec_irq_work+0x8c/0xb0 arch/x86/kernel/irq_work.c:17 asm_sysvec_irq_work+0x1b/0x20 RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irq+0x25/0x40 kernel/locking/spinlock.c:202 Code: f1 10 f7 ff 90 53 48 89 fb 48 83 c7 18 48 8b 74 24 08 e8 2e ab 33 f7 48 89 df e8 36 1c 35 f7 e8 e1 f1 59 f7 fb bf 01 00 00 00 46 cd 27 f7 65 8b 05 47 37 ce 75 85 c0 74 02 5b c3 e8 ec 20 cc RSP: 0018:ffffc90002fffca0 EFLAGS: 00000286 RAX: 53c048338110e800 RBX: ffff888012bf7550 RCX: ffffffff91540e03 RDX: dffffc0000000000 RSI: ffffffff8a8d22c0 RDI: 0000000000000001 RBP: ffff88807459343c R08: dffffc0000000000 R09: ffffed100257eeab R10: ffffed100257eeab R11: 1ffff1100257eeaa R12: ffff888012bf7540 R13: ffff888074593400 R14: dffffc0000000000 R15: ffff888012bf7500 spin_unlock_irq include/linux/spinlock.h:399 [inline] sw_sync_debugfs_release+0x14d/0x1d0 drivers/dma-buf/sw_sync.c:321 __fput+0x3b9/0x820 fs/file_table.c:317 task_work_run+0x146/0x1c0 kernel/task_work.c:177 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x547/0x1ed0 kernel/exit.c:795 do_group_exit+0x23b/0x2f0 kernel/exit.c:925 __do_sys_exit_group kernel/exit.c:936 [inline] __se_sys_exit_group kernel/exit.c:934 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:934 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7f81bb976969 Code: Unable to access opcode bytes at RIP 0x7f81bb97693f. RSP: 002b:00007ffe03958588 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 00007f81bb9ea2b0 RCX: 00007f81bb976969 ---------------- Code disassembly (best guess): 0: f1 icebp 1: 10 f7 adc %dh,%bh 3: ff 90 53 48 89 fb callq *-0x476b7ad(%rax) 9: 48 83 c7 18 add $0x18,%rdi d: 48 8b 74 24 08 mov 0x8(%rsp),%rsi 12: e8 2e ab 33 f7 callq 0xf733ab45 17: 48 89 df mov %rbx,%rdi 1a: e8 36 1c 35 f7 callq 0xf7351c55 1f: e8 e1 f1 59 f7 callq 0xf759f205 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 46 cd 27 f7 callq 0xf727cd75 <-- trapping instruction 2f: 65 8b 05 47 37 ce 75 mov %gs:0x75ce3747(%rip),%eax # 0x75ce377d 36: 85 c0 test %eax,%eax 38: 74 02 je 0x3c 3a: 5b pop %rbx 3b: c3 retq 3c: e8 .byte 0xe8 3d: ec in (%dx),%al 3e: 20 cc and %cl,%ah