================================ WARNING: inconsistent lock state 6.9.0-rc6-syzkaller-00053-g0106679839f7 #0 Not tainted -------------------------------- inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. syz-executor.0/24942 [HC0[0]:SC0[0]:HE0:SE1] takes: ffff80008706c738 (sync_timeline_list_lock){?...}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:376 [inline] ffff80008706c738 (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 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] do_notify_resume+0x1d4/0x25c arch/arm64/kernel/entry-common.c:151 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+0x100/0x180 arch/arm64/kernel/entry-common.c:713 el0t_64_sync_handler+0x100/0x12c arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 irq event stamp: 350 hardirqs last enabled at (349): [] mod_objcg_state+0x490/0x8ac mm/memcontrol.c:3420 hardirqs last disabled at (350): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:117 [inline] hardirqs last disabled at (350): [] _raw_spin_lock_irq+0x70/0x74 kernel/locking/spinlock.c:170 softirqs last enabled at (330): [] fpsimd_restore_current_state+0x44/0xe4 arch/arm64/kernel/fpsimd.c:1784 softirqs last disabled at (328): [] alternative_has_cap_likely arch/arm64/include/asm/alternative-macros.h:232 [inline] softirqs last disabled at (328): [] system_supports_fpsimd arch/arm64/include/asm/cpufeature.h:734 [inline] softirqs last disabled at (328): [] 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 *** 2 locks held by syz-executor.0/24942: #0: ffff0000149bae80 (&p->lock){+.+.}-{3:3}, at: seq_read_iter+0xb8/0xe3c fs/seq_file.c:182 #1: ffff80008706c738 (sync_timeline_list_lock){?...}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:376 [inline] #1: ffff80008706c738 (sync_timeline_list_lock){?...}-{2:2}, at: sync_info_debugfs_show+0x4c/0x1f0 drivers/dma-buf/sync_debug.c:147 stack backtrace: CPU: 1 PID: 24942 Comm: syz-executor.0 Not tainted 6.9.0-rc6-syzkaller-00053-g0106679839f7 #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 do_loop_readv_writev fs/read_write.c:761 [inline] do_loop_readv_writev fs/read_write.c:749 [inline] vfs_readv+0x394/0x564 fs/read_write.c:934 do_preadv+0x158/0x1dc fs/read_write.c:1049 __do_sys_preadv fs/read_write.c:1099 [inline] __se_sys_preadv fs/read_write.c:1094 [inline] __arm64_sys_preadv+0x8c/0xcc fs/read_write.c:1094 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x6c/0x25c arch/arm64/kernel/syscall.c:48 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:133 do_el0_svc+0x40/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x100/0x12c arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598