================================ WARNING: inconsistent lock state 6.5.0-rc7-syzkaller-00024-g93f5de5f648d #0 Not tainted -------------------------------- inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. syz-executor.0/5604 [HC0[0]:SC0[0]:HE0:SE1] takes: ffffffff8dbfdd58 (sync_timeline_list_lock){?...}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:376 [inline] ffffffff8dbfdd58 (sync_timeline_list_lock){?...}-{2:2}, at: sync_info_debugfs_show+0x94/0x4c0 drivers/dma-buf/sync_debug.c:147 {IN-HARDIRQ-W} state was registered at: lock_acquire+0x1e3/0x520 kernel/locking/lockdep.c:5761 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 sync_timeline_debug_remove+0x2c/0x150 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+0x204/0x250 drivers/dma-buf/sw_sync.c:144 kref_put include/linux/kref.h:65 [inline] dma_fence_put include/linux/dma-fence.h:296 [inline] dma_fence_array_release+0x13e/0x240 drivers/dma-buf/dma-fence-array.c:120 irq_work_single+0xd9/0x230 kernel/irq_work.c:221 irq_work_run_list kernel/irq_work.c:252 [inline] irq_work_run+0x18b/0x350 kernel/irq_work.c:261 __sysvec_irq_work+0xa0/0x260 arch/x86/kernel/irq_work.c:22 sysvec_irq_work+0x8d/0xb0 arch/x86/kernel/irq_work.c:17 asm_sysvec_irq_work+0x1a/0x20 arch/x86/include/asm/idtentry.h:671 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline] _raw_spin_unlock_irq+0x29/0x50 kernel/locking/spinlock.c:202 spin_unlock_irq include/linux/spinlock.h:401 [inline] sw_sync_debugfs_release+0x149/0x1c0 drivers/dma-buf/sw_sync.c:321 __fput+0x3f8/0x950 fs/file_table.c:384 task_work_run+0x24a/0x300 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:297 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd irq event stamp: 320 hardirqs last enabled at (319): [] mod_objcg_state+0x458/0x6c0 mm/memcontrol.c:3227 hardirqs last disabled at (320): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (320): [] _raw_spin_lock_irq+0xad/0x120 kernel/locking/spinlock.c:170 softirqs last enabled at (204): [] sock_orphan include/net/sock.h:2088 [inline] softirqs last enabled at (204): [] sk_common_release+0x116/0x2c0 net/core/sock.c:3728 softirqs last disabled at (202): [] sock_orphan include/net/sock.h:2084 [inline] softirqs last disabled at (202): [] sk_common_release+0xb0/0x2c0 net/core/sock.c:3728 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(sync_timeline_list_lock); lock(sync_timeline_list_lock); *** DEADLOCK *** 3 locks held by syz-executor.0/5604: #0: ffff88802b41b248 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2b0/0x340 fs/file.c:1062 #1: ffff88807d9401c8 (&p->lock){+.+.}-{3:3}, at: seq_read_iter+0xb2/0xd10 fs/seq_file.c:182 #2: ffffffff8dbfdd58 (sync_timeline_list_lock){?...}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:376 [inline] #2: ffffffff8dbfdd58 (sync_timeline_list_lock){?...}-{2:2}, at: sync_info_debugfs_show+0x94/0x4c0 drivers/dma-buf/sync_debug.c:147 stack backtrace: CPU: 0 PID: 5604 Comm: syz-executor.0 Not tainted 6.5.0-rc7-syzkaller-00024-g93f5de5f648d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 valid_state+0x135/0x1c0 kernel/locking/lockdep.c:4020 mark_lock_irq+0xac/0xba0 kernel/locking/lockdep.c:4223 mark_lock+0x21b/0x340 kernel/locking/lockdep.c:4685 mark_held_locks kernel/locking/lockdep.c:4281 [inline] __trace_hardirqs_on_caller kernel/locking/lockdep.c:4299 [inline] lockdep_hardirqs_on_prepare+0x281/0x7a0 kernel/locking/lockdep.c:4366 trace_hardirqs_on+0x28/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+0x158/0x4c0 drivers/dma-buf/sync_debug.c:153 seq_read_iter+0x43e/0xd10 fs/seq_file.c:230 seq_read+0x28d/0x380 fs/seq_file.c:162 vfs_read+0x279/0xb00 fs/read_write.c:468 ksys_read+0x1a0/0x2c0 fs/read_write.c:613 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f13d3c798e9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f13d4cf90c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007f13d3d8c030 RCX: 00007f13d3c798e9 RDX: 0000000000002020 RSI: 0000000020001540 RDI: 0000000000000003 RBP: 00007f13d3cd5044 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f13d3d8c030 R15: 00007ffe5b6d0c48