================================ WARNING: inconsistent lock state 6.9.0-rc3-syzkaller-00058-ga6189a740779 #0 Not tainted -------------------------------- inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. syz-executor.0/15129 [HC0[0]:SC0[0]:HE0:SE1] takes: ffff80008706b9f8 (sync_timeline_list_lock){?...}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:376 [inline] ffff80008706b9f8 (sync_timeline_list_lock){?...}-{2:2}, at: sync_info_debugfs_show+0x4c/0x1f0 drivers/dma-buf/sync_debug.c:147 {IN-HARDIRQ-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x4a8/0x7f0 kernel/locking/lockdep.c:5719 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x58/0x80 kernel/locking/spinlock.c:162 sync_timeline_debug_remove+0x30/0x160 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+0x1fc/0x288 drivers/dma-buf/sw_sync.c:165 dma_fence_release+0x270/0x578 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+0x198/0x230 drivers/dma-buf/dma-fence-array.c:120 dma_fence_release+0x270/0x578 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+0xac/0xf4 drivers/dma-buf/dma-fence-array.c:52 irq_work_single+0x140/0x1e4 kernel/irq_work.c:221 irq_work_run_list+0x84/0xb4 kernel/irq_work.c:252 irq_work_run+0x5c/0xe4 kernel/irq_work.c:261 do_handle_IPI arch/arm64/kernel/smp.c:923 [inline] ipi_handler+0x160/0x788 arch/arm64/kernel/smp.c:950 handle_percpu_devid_irq+0x19c/0x30c kernel/irq/chip.c:942 generic_handle_irq_desc include/linux/irqdesc.h:161 [inline] handle_irq_desc kernel/irq/irqdesc.c:688 [inline] generic_handle_domain_irq+0x78/0xa4 kernel/irq/irqdesc.c:744 gic_handle_irq+0x54/0x184 drivers/irqchip/irq-gic.c:370 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:889 do_interrupt_handler+0x12c/0x150 arch/arm64/kernel/entry-common.c:310 __el1_irq arch/arm64/kernel/entry-common.c:536 [inline] el1_interrupt+0x34/0x54 arch/arm64/kernel/entry-common.c:551 el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:556 el1h_64_irq+0x64/0x68 arch/arm64/kernel/entry.S:594 __daif_local_irq_enable arch/arm64/include/asm/irqflags.h:27 [inline] arch_local_irq_enable arch/arm64/include/asm/irqflags.h:49 [inline] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] _raw_spin_unlock_irq+0x34/0x8c kernel/locking/spinlock.c:202 spin_unlock_irq include/linux/spinlock.h:401 [inline] sw_sync_debugfs_release+0x10c/0x208 drivers/dma-buf/sw_sync.c:359 __fput+0x1a4/0x92c fs/file_table.c:422 ____fput+0x10/0x1c fs/file_table.c:450 task_work_run+0x124/0x20c kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x754/0x202c kernel/exit.c:878 do_group_exit+0xa4/0x208 kernel/exit.c:1027 get_signal+0x1870/0x1b24 kernel/signal.c:2911 do_signal+0x18c/0x2b68 arch/arm64/kernel/signal.c:1308 do_notify_resume+0x190/0x25c arch/arm64/kernel/entry-common.c:148 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_svc_compat+0xfc/0x17c arch/arm64/kernel/entry-common.c:853 el0t_32_sync_handler+0x98/0x13c arch/arm64/kernel/entry-common.c:862 el0t_32_sync+0x194/0x198 arch/arm64/kernel/entry.S:603 irq event stamp: 616 hardirqs last enabled at (615): [] mod_objcg_state+0x490/0x8ac mm/memcontrol.c:3420 hardirqs last disabled at (616): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (616): [] _raw_spin_lock_irq+0x70/0x74 kernel/locking/spinlock.c:170 softirqs last enabled at (586): [] fpsimd_restore_current_state+0x44/0xe4 arch/arm64/kernel/fpsimd.c:1784 softirqs last disabled at (584): [] alternative_has_cap_likely arch/arm64/include/asm/alternative-macros.h:232 [inline] softirqs last disabled at (584): [] system_supports_fpsimd arch/arm64/include/asm/cpufeature.h:734 [inline] softirqs last disabled at (584): [] fpsimd_restore_current_state+0x14/0xe4 arch/arm64/kernel/fpsimd.c:1777 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/15129: #0: ffff00000e542d48 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0xac/0x12c fs/file.c:1191 #1: ffff00000e0b32f0 (&p->lock){+.+.}-{3:3}, at: seq_read_iter+0xb8/0xe3c fs/seq_file.c:182 #2: ffff80008706b9f8 (sync_timeline_list_lock){?...}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:376 [inline] #2: ffff80008706b9f8 (sync_timeline_list_lock){?...}-{2:2}, at: sync_info_debugfs_show+0x4c/0x1f0 drivers/dma-buf/sync_debug.c:147 stack backtrace: CPU: 0 PID: 15129 Comm: syz-executor.0 Not tainted 6.9.0-rc3-syzkaller-00058-ga6189a740779 #0 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace+0x9c/0x11c arch/arm64/kernel/stacktrace.c:317 show_stack+0x18/0x24 arch/arm64/kernel/stacktrace.c:324 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xa4/0xf4 lib/dump_stack.c:114 dump_stack+0x1c/0x28 lib/dump_stack.c:123 print_usage_bug.part.0+0x508/0x90c kernel/locking/lockdep.c:4001 print_usage_bug kernel/locking/lockdep.c:3971 [inline] valid_state kernel/locking/lockdep.c:4013 [inline] mark_lock_irq kernel/locking/lockdep.c:4222 [inline] mark_lock+0xf18/0x19b8 kernel/locking/lockdep.c:4678 mark_held_locks+0xa8/0x10c kernel/locking/lockdep.c:4274 __trace_hardirqs_on_caller kernel/locking/lockdep.c:4292 [inline] lockdep_hardirqs_on_prepare+0x368/0x664 kernel/locking/lockdep.c:4359 trace_hardirqs_on+0xf4/0x28c kernel/trace/trace_preemptirq.c:61 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] _raw_spin_unlock_irq+0x30/0x8c 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+0xf4/0x1f0 drivers/dma-buf/sync_debug.c:153 seq_read_iter+0x350/0xe3c fs/seq_file.c:230 seq_read+0x254/0x378 fs/seq_file.c:162 vfs_read+0x18c/0x948 fs/read_write.c:474 ksys_read+0xf0/0x1dc fs/read_write.c:619 __do_sys_read fs/read_write.c:629 [inline] __se_sys_read fs/read_write.c:627 [inline] __arm64_sys_read+0x6c/0x9c fs/read_write.c:627 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x6c/0x258 arch/arm64/kernel/syscall.c:48 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:133 do_el0_svc_compat+0x40/0x68 arch/arm64/kernel/syscall.c:158 el0_svc_compat+0x4c/0x17c arch/arm64/kernel/entry-common.c:852 el0t_32_sync_handler+0x98/0x13c arch/arm64/kernel/entry-common.c:862 el0t_32_sync+0x194/0x198 arch/arm64/kernel/entry.S:603