================================ WARNING: inconsistent lock state 5.15.157-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.0/16887 [HC1[1]:SC0[0]:HE0:SE1] takes: ffffffff8d159098 (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+0x67/0x80 kernel/trace/trace_preemptirq.c:49 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 spin_unlock_irq include/linux/spinlock.h:413 [inline] sync_print_obj drivers/dma-buf/sync_debug.c:118 [inline] sync_info_debugfs_show+0x154/0x4c0 drivers/dma-buf/sync_debug.c:153 seq_read_iter+0x43a/0xd10 fs/seq_file.c:230 seq_read+0x452/0x5c0 fs/seq_file.c:162 vfs_read+0x300/0xe10 fs/read_write.c:483 ksys_read+0x1a2/0x2c0 fs/read_write.c:623 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 irq event stamp: 1870 hardirqs last enabled at (1869): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (1869): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 hardirqs last disabled at (1870): [] sysvec_irq_work+0xa/0xb0 arch/x86/kernel/irq_work.c:17 softirqs last enabled at (616): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last enabled at (616): [] __irq_exit_rcu+0x155/0x240 kernel/softirq.c:637 softirqs last disabled at (553): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last disabled at (553): [] __irq_exit_rcu+0x155/0x240 kernel/softirq.c:637 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-executor.0/16887. stack backtrace: CPU: 0 PID: 16887 Comm: syz-executor.0 Not tainted 5.15.157-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 valid_state+0x134/0x1c0 kernel/locking/lockdep.c:3932 mark_lock_irq+0xa8/0xba0 kernel/locking/lockdep.c:4135 mark_lock+0x21a/0x340 kernel/locking/lockdep.c:4591 mark_usage kernel/locking/lockdep.c:4483 [inline] __lock_acquire+0xb5c/0x1ff0 kernel/locking/lockdep.c:4966 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __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:279 [inline] dma_fence_array_release+0x127/0x230 drivers/dma-buf/dma-fence-array.c:120 irq_work_single kernel/irq_work.c:155 [inline] irq_work_run_list+0x20b/0x370 kernel/irq_work.c:177 irq_work_run+0x63/0xe0 kernel/irq_work.c:186 __sysvec_irq_work+0x9a/0x250 arch/x86/kernel/irq_work.c:22 sysvec_irq_work+0x89/0xb0 arch/x86/kernel/irq_work.c:17 asm_sysvec_irq_work+0x16/0x20 arch/x86/include/asm/idtentry.h:664 RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline] RIP: 0010:_raw_spin_unlock_irq+0x25/0x40 kernel/locking/spinlock.c:202 Code: 51 80 f6 ff 90 53 48 89 fb 48 83 c7 18 48 8b 74 24 08 e8 7e 84 3b f7 48 89 df e8 56 d8 3c f7 e8 71 8f 5f f7 fb bf 01 00 00 00 76 14 30 f7 65 8b 05 47 22 db 75 85 c0 74 02 5b c3 e8 b4 40 d9 RSP: 0018:ffffc900032df900 EFLAGS: 00000286 RAX: 32bb578bee8e1700 RBX: ffff8880192b8050 RCX: ffffffff913eef03 RDX: dffffc0000000000 RSI: ffffffff8a8b2980 RDI: 0000000000000001 RBP: ffff88805509e33c R08: ffffffff8186dd10 R09: ffffed100325700b R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8880192b8040 R13: ffff88805509e300 R14: dffffc0000000000 R15: ffff8880192b8000 spin_unlock_irq include/linux/spinlock.h:413 [inline] sw_sync_debugfs_release+0x145/0x1c0 drivers/dma-buf/sw_sync.c:321 __fput+0x3bf/0x890 fs/file_table.c:280 task_work_run+0x129/0x1a0 kernel/task_work.c:164 exit_task_work include/linux/task_work.h:32 [inline] do_exit+0x6a3/0x2480 kernel/exit.c:872 do_group_exit+0x144/0x310 kernel/exit.c:994 get_signal+0xc66/0x14e0 kernel/signal.c:2889 arch_do_signal_or_restart+0xc3/0x1890 arch/x86/kernel/signal.c:867 handle_signal_work kernel/entry/common.c:154 [inline] exit_to_user_mode_loop+0x97/0x130 kernel/entry/common.c:178 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f5e6a09dea9 Code: Unable to access opcode bytes at RIP 0x7f5e6a09de7f. RSP: 002b:00007f5e68610178 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: 0000000000000001 RBX: 00007f5e6a1cbf88 RCX: 00007f5e6a09dea9 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f5e6a1cbf8c RBP: 00007f5e6a1cbf80 R08: 0000000000000010 R09: 00007f5e686106c0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f5e6a1cbf8c R13: 000000000000000b R14: 00007ffea1e1c640 R15: 00007ffea1e1c728 ---------------- Code disassembly (best guess): 0: 51 push %rcx 1: 80 f6 ff xor $0xff,%dh 4: 90 nop 5: 53 push %rbx 6: 48 89 fb mov %rdi,%rbx 9: 48 83 c7 18 add $0x18,%rdi d: 48 8b 74 24 08 mov 0x8(%rsp),%rsi 12: e8 7e 84 3b f7 call 0xf73b8495 17: 48 89 df mov %rbx,%rdi 1a: e8 56 d8 3c f7 call 0xf73cd875 1f: e8 71 8f 5f f7 call 0xf75f8f95 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 76 14 30 f7 call 0xf73014a5 <-- trapping instruction 2f: 65 8b 05 47 22 db 75 mov %gs:0x75db2247(%rip),%eax # 0x75db227d 36: 85 c0 test %eax,%eax 38: 74 02 je 0x3c 3a: 5b pop %rbx 3b: c3 ret 3c: e8 .byte 0xe8 3d: b4 40 mov $0x40,%ah 3f: d9 .byte 0xd9