================================ WARNING: inconsistent lock state 6.6.0-syzkaller-15859-g89cdf9d55601 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor367/5174 [HC1[1]:SC0[0]:HE0:SE1] takes: ffffffff8ddfbe18 (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:4291 [inline] lockdep_hardirqs_on_prepare kernel/locking/lockdep.c:4358 [inline] lockdep_hardirqs_on_prepare+0x139/0x410 kernel/locking/lockdep.c:4310 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+0x196/0x240 fs/seq_file.c:162 vfs_read+0x1ce/0x8f0 fs/read_write.c:468 ksys_read+0x12f/0x250 fs/read_write.c:613 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b irq event stamp: 19360 hardirqs last enabled at (19359): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (19359): [] _raw_spin_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:202 hardirqs last disabled at (19360): [] sysvec_irq_work+0xe/0xc0 arch/x86/kernel/irq_work.c:17 softirqs last enabled at (18224): [] invoke_softirq kernel/softirq.c:427 [inline] softirqs last enabled at (18224): [] __irq_exit_rcu kernel/softirq.c:632 [inline] softirqs last enabled at (18224): [] irq_exit_rcu+0xb7/0x120 kernel/softirq.c:644 softirqs last disabled at (18215): [] invoke_softirq kernel/softirq.c:427 [inline] softirqs last disabled at (18215): [] __irq_exit_rcu kernel/softirq.c:632 [inline] softirqs last disabled at (18215): [] irq_exit_rcu+0xb7/0x120 kernel/softirq.c:644 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-executor367/5174. stack backtrace: CPU: 0 PID: 5174 Comm: syz-executor367 Not tainted 6.6.0-syzkaller-15859-g89cdf9d55601 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 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:3970 [inline] valid_state kernel/locking/lockdep.c:4012 [inline] mark_lock_irq kernel/locking/lockdep.c:4215 [inline] mark_lock+0x11f3/0x1950 kernel/locking/lockdep.c:4677 mark_usage kernel/locking/lockdep.c:4563 [inline] __lock_acquire+0x163e/0x5de0 kernel/locking/lockdep.c:5090 lock_acquire kernel/locking/lockdep.c:5753 [inline] lock_acquire+0x1ae/0x510 kernel/locking/lockdep.c:5718 __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:104 [inline] kref_put include/linux/kref.h:65 [inline] sync_timeline_put drivers/dma-buf/sw_sync.c:116 [inline] timeline_fence_release+0x262/0x340 drivers/dma-buf/sw_sync.c:144 dma_fence_release+0x2ef/0x500 drivers/dma-buf/dma-fence.c:560 kref_put include/linux/kref.h:65 [inline] dma_fence_put include/linux/dma-fence.h:296 [inline] dma_fence_put include/linux/dma-fence.h:293 [inline] dma_fence_array_release+0x1fa/0x2e0 drivers/dma-buf/dma-fence-array.c:120 dma_fence_release+0x2ef/0x500 drivers/dma-buf/dma-fence.c:560 kref_put include/linux/kref.h:65 [inline] dma_fence_put include/linux/dma-fence.h:296 [inline] dma_fence_put include/linux/dma-fence.h:293 [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 kernel/irq_work.c:252 [inline] irq_work_run_list+0x92/0xc0 kernel/irq_work.c:235 irq_work_run+0x58/0xd0 kernel/irq_work.c:261 __sysvec_irq_work+0x82/0x390 arch/x86/kernel/irq_work.c:22 sysvec_irq_work+0x8e/0xc0 arch/x86/kernel/irq_work.c:17 asm_sysvec_irq_work+0x1a/0x20 arch/x86/include/asm/idtentry.h:670 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 1a 88 e2 f6 48 89 df e8 12 07 e3 f6 e8 cd ed 08 f7 fb bf 01 00 00 00 62 53 d4 f6 65 8b 05 63 54 7e 75 85 c0 74 02 5b c3 e8 50 19 7b RSP: 0018:ffffc900035bfcc8 EFLAGS: 00000206 RAX: 0000000000004b9f RBX: ffff888020d8be50 RCX: 1ffffffff1e31eb9 RDX: 0000000000000000 RSI: ffffffff8acca9a0 RDI: 0000000000000001 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff8f192857 R11: 0000000000000000 R12: ffff888020d8be00 R13: dffffc0000000000 R14: ffff888020d8be00 R15: ffff888020d8be50 spin_unlock_irq include/linux/spinlock.h:401 [inline] sw_sync_debugfs_release+0x164/0x240 drivers/dma-buf/sw_sync.c:321 __fput+0x270/0xbb0 fs/file_table.c:394 task_work_run+0x14d/0x240 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa92/0x2ae0 kernel/exit.c:871 do_group_exit+0xd4/0x2a0 kernel/exit.c:1021 __do_sys_exit_group kernel/exit.c:1032 [inline] __se_sys_exit_group kernel/exit.c:1030 [inline] __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1030 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7f4d08a39ef9 Code: Unable to access opcode bytes at 0x7f4d08a39ecf. RSP: 002b:00007fff18c00958 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f4d08a39ef9 RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 RBP: 00007f4d08ab42b0 R08: ffffffffffffffb8 R09: 00000000000ac5f8 R10: 00000000000ac5f8 R11: 0000000000000246 R12: 00007f4d08ab42b0 R13: 0000000000000000 R14: 00007f4d08ab4d00 R15: 00007f4d08a0bcf0 ---------------- 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 1a 88 e2 f6 call 0xf6e28831 17: 48 89 df mov %rbx,%rdi 1a: e8 12 07 e3 f6 call 0xf6e30731 1f: e8 cd ed 08 f7 call 0xf708edf1 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 62 53 d4 f6 call 0xf6d45391 <-- trapping instruction 2f: 65 8b 05 63 54 7e 75 mov %gs:0x757e5463(%rip),%eax # 0x757e5499 36: 85 c0 test %eax,%eax 38: 74 02 je 0x3c 3a: 5b pop %rbx 3b: c3 ret 3c: e8 .byte 0xe8 3d: 50 push %rax 3e: 19 .byte 0x19 3f: 7b .byte 0x7b