================================ WARNING: inconsistent lock state 6.8.0-rc1-syzkaller-00356-g8a696a29c690 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor223/5062 [HC1[1]:SC0[0]:HE0:SE1] takes: ffffffff8e010e78 (sync_timeline_list_lock){?.+.}-{2:2}, at: sync_timeline_debug_remove+0x29/0x1a0 drivers/dma-buf/sync_debug.c:31 {HARDIRQ-ON-W} state was registered at: __trace_hardirqs_on_caller kernel/locking/lockdep.c:4292 [inline] lockdep_hardirqs_on_prepare kernel/locking/lockdep.c:4359 [inline] lockdep_hardirqs_on_prepare+0x139/0x420 kernel/locking/lockdep.c:4311 trace_hardirqs_on+0x36/0x40 kernel/trace/trace_preemptirq.c:61 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] _raw_spin_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:202 spin_unlock_irq include/linux/spinlock.h:401 [inline] sync_print_obj drivers/dma-buf/sync_debug.c:118 [inline] sync_info_debugfs_show+0xef/0x200 drivers/dma-buf/sync_debug.c:153 seq_read_iter+0x4e5/0x1280 fs/seq_file.c:230 seq_read+0x392/0x4d0 fs/seq_file.c:162 vfs_read+0x1d4/0xb70 fs/read_write.c:474 ksys_read+0x12f/0x250 fs/read_write.c:619 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd3/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x63/0x6b irq event stamp: 3040 hardirqs last enabled at (3039): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (3039): [] _raw_spin_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:202 hardirqs last disabled at (3040): [] sysvec_irq_work+0xe/0xb0 arch/x86/kernel/irq_work.c:17 softirqs last enabled at (0): [] copy_process+0x245b/0x97b0 kernel/fork.c:2443 softirqs last disabled at (0): [<0000000000000000>] 0x0 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-executor223/5062. stack backtrace: CPU: 1 PID: 5062 Comm: syz-executor223 Not tainted 6.8.0-rc1-syzkaller-00356-g8a696a29c690 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_usage_bug kernel/locking/lockdep.c:3971 [inline] valid_state kernel/locking/lockdep.c:4013 [inline] mark_lock_irq kernel/locking/lockdep.c:4216 [inline] mark_lock+0x91a/0xc50 kernel/locking/lockdep.c:4678 mark_usage kernel/locking/lockdep.c:4564 [inline] __lock_acquire+0x137a/0x3b30 kernel/locking/lockdep.c:5091 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1ae/0x520 kernel/locking/lockdep.c:5719 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x50 kernel/locking/spinlock.c:162 sync_timeline_debug_remove+0x29/0x1a0 drivers/dma-buf/sync_debug.c:31 sync_timeline_free drivers/dma-buf/sw_sync.c:125 [inline] kref_put include/linux/kref.h:65 [inline] sync_timeline_put drivers/dma-buf/sw_sync.c:137 [inline] timeline_fence_release+0x262/0x340 drivers/dma-buf/sw_sync.c:165 dma_fence_release+0x2f3/0x510 drivers/dma-buf/dma-fence.c:560 kref_put include/linux/kref.h:65 [inline] dma_fence_put include/linux/dma-fence.h:297 [inline] dma_fence_put include/linux/dma-fence.h:294 [inline] dma_fence_array_release+0x1fa/0x2e0 drivers/dma-buf/dma-fence-array.c:120 dma_fence_release+0x2f3/0x510 drivers/dma-buf/dma-fence.c:560 kref_put include/linux/kref.h:65 [inline] dma_fence_put include/linux/dma-fence.h:297 [inline] dma_fence_put include/linux/dma-fence.h:294 [inline] irq_dma_fence_array_work+0xa9/0xd0 drivers/dma-buf/dma-fence-array.c:52 irq_work_single+0x1b5/0x260 kernel/irq_work.c:221 irq_work_run_list+0x92/0xc0 kernel/irq_work.c:252 irq_work_run+0x58/0xd0 kernel/irq_work.c:261 __sysvec_irq_work+0x82/0x3a0 arch/x86/kernel/irq_work.c:22 sysvec_irq_work+0x90/0xb0 arch/x86/kernel/irq_work.c:17 asm_sysvec_irq_work+0x1a/0x20 arch/x86/include/asm/idtentry.h:674 RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irq+0x29/0x50 kernel/locking/spinlock.c:202 Code: 90 f3 0f 1e fa 53 48 8b 74 24 08 48 89 fb 48 83 c7 18 e8 4a 76 d6 f6 48 89 df e8 42 ee d6 f6 e8 8d 05 fd f6 fb bf 01 00 00 00 42 8e c8 f6 65 8b 05 03 c3 71 75 85 c0 74 02 5b c3 e8 70 81 6e RSP: 0018:ffffc90003b4faa0 EFLAGS: 00000202 RAX: 0000000000000bdf RBX: ffff888018e8f270 RCX: 1ffffffff1e75901 RDX: 0000000000000000 RSI: ffffffff8accae80 RDI: 0000000000000001 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff8f3afa97 R11: 0000000000000001 R12: ffff888018e8f220 R13: dffffc0000000000 R14: ffff888018e8f220 R15: ffff888018e8f270 spin_unlock_irq include/linux/spinlock.h:401 [inline] sw_sync_debugfs_release+0x164/0x240 drivers/dma-buf/sw_sync.c:359 __fput+0x270/0xb70 fs/file_table.c:376 task_work_run+0x14d/0x240 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa8a/0x2ad0 kernel/exit.c:871 do_group_exit+0xd4/0x2a0 kernel/exit.c:1020 get_signal+0x23b5/0x2790 kernel/signal.c:2893 arch_do_signal_or_restart+0x90/0x7f0 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:105 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0x156/0x2b0 kernel/entry/common.c:212 do_syscall_64+0xe0/0x250 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f5d111bdd69 Code: Unable to access opcode bytes at 0x7f5d111bdd3f. RSP: 002b:00007ffcda73ed58 EFLAGS: 00000246 ORIG_RAX: 000000000000010f RAX: fffffffffffffdfe RBX: 0000000000000000 RCX: 00007f5d111bdd69 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000020000100 RBP: 00000000000f4240 R08: 0000000000000000 R09: 00000000000000a0 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffcda73ef78 R14: 00007ffcda73ed80 R15: 00007ffcda73ed70 ---------------- Code disassembly (best guess): 0: 90 nop 1: f3 0f 1e fa endbr64 5: 53 push %rbx 6: 48 8b 74 24 08 mov 0x8(%rsp),%rsi b: 48 89 fb mov %rdi,%rbx e: 48 83 c7 18 add $0x18,%rdi 12: e8 4a 76 d6 f6 call 0xf6d67661 17: 48 89 df mov %rbx,%rdi 1a: e8 42 ee d6 f6 call 0xf6d6ee61 1f: e8 8d 05 fd f6 call 0xf6fd05b1 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 42 8e c8 f6 call 0xf6c88e71 <-- trapping instruction 2f: 65 8b 05 03 c3 71 75 mov %gs:0x7571c303(%rip),%eax # 0x7571c339 36: 85 c0 test %eax,%eax 38: 74 02 je 0x3c 3a: 5b pop %rbx 3b: c3 ret 3c: e8 .byte 0xe8 3d: 70 81 jo 0xffffffc0 3f: 6e outsb %ds:(%rsi),(%dx)