================================ WARNING: inconsistent lock state 6.2.0-rc2-syzkaller-00203-g1f5abbd77e2c #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.1/11083 [HC1[1]:SC0[0]:HE0:SE1] takes: ffffffff8ddc0cd8 (sync_timeline_list_lock){?.+.}-{2:2}, at: sync_timeline_debug_remove+0x28/0x140 drivers/dma-buf/sync_debug.c:31 {HARDIRQ-ON-W} state was registered at: trace_hardirqs_on+0x34/0x40 kernel/trace/trace_preemptirq.c:49 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 spin_unlock_irq include/linux/spinlock.h:400 [inline] sync_print_obj drivers/dma-buf/sync_debug.c:118 [inline] sync_info_debugfs_show+0x17e/0x510 drivers/dma-buf/sync_debug.c:153 seq_read_iter+0x43a/0xd30 fs/seq_file.c:230 seq_read+0x287/0x380 fs/seq_file.c:162 vfs_read+0x2eb/0xbc0 fs/read_write.c:468 ksys_read+0x19b/0x2c0 fs/read_write.c:613 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd irq event stamp: 1854 hardirqs last enabled at (1853): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (1853): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 hardirqs last disabled at (1854): [] sysvec_irq_work+0xa/0xb0 arch/x86/kernel/irq_work.c:17 softirqs last enabled at (578): [] __irq_exit_rcu+0xec/0x170 kernel/softirq.c:650 softirqs last disabled at (555): [] __irq_exit_rcu+0xec/0x170 kernel/softirq.c:650 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-executor.1/11083. stack backtrace: CPU: 0 PID: 11083 Comm: syz-executor.1 Not tainted 6.2.0-rc2-syzkaller-00203-g1f5abbd77e2c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 mark_lock_irq+0xb2a/0xf10 mark_lock+0x21e/0x350 kernel/locking/lockdep.c:4634 mark_usage kernel/locking/lockdep.c:4526 [inline] __lock_acquire+0xb40/0x1f60 kernel/locking/lockdep.c:5009 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5668 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 sync_timeline_debug_remove+0x28/0x140 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+0x200/0x250 drivers/dma-buf/sw_sync.c:144 kref_put include/linux/kref.h:65 [inline] dma_fence_put include/linux/dma-fence.h:276 [inline] dma_fence_array_release+0x134/0x240 drivers/dma-buf/dma-fence-array.c:120 irq_work_single+0xd3/0x230 kernel/irq_work.c:211 irq_work_run_list kernel/irq_work.c:242 [inline] irq_work_run+0x189/0x350 kernel/irq_work.c:251 __sysvec_irq_work+0x62/0x70 arch/x86/kernel/irq_work.c:22 sysvec_irq_work+0x8c/0xb0 arch/x86/kernel/irq_work.c:17 asm_sysvec_irq_work+0x16/0x20 arch/x86/include/asm/idtentry.h:675 RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline] RIP: 0010:_raw_spin_unlock_irq+0x25/0x40 kernel/locking/spinlock.c:202 Code: 81 8b f6 ff 90 53 48 89 fb 48 83 c7 18 48 8b 74 24 08 e8 2e 3d 9d f6 48 89 df e8 06 95 9e f6 e8 b1 13 c5 f6 fb bf 01 00 00 00 f6 db 90 f6 65 8b 05 07 1e 34 75 85 c0 74 02 5b c3 e8 e4 13 31 RSP: 0018:ffffc900153a7bd0 EFLAGS: 00000286 RAX: 35fc06b25b963c00 RBX: ffff88805bb7f750 RCX: ffffffff92168003 RDX: dffffc0000000000 RSI: ffffffff8b0d9960 RDI: 0000000000000001 RBP: ffff888076de153c R08: dffffc0000000000 R09: ffffed100b76feeb R10: ffffed100b76feeb R11: 1ffff1100b76feea R12: ffff88805bb7f740 R13: ffff888076de1500 R14: dffffc0000000000 R15: ffff88805bb7f700 spin_unlock_irq include/linux/spinlock.h:400 [inline] sw_sync_debugfs_release+0x14d/0x1d0 drivers/dma-buf/sw_sync.c:321 __fput+0x3ba/0x880 fs/file_table.c:320 task_work_run+0x243/0x300 kernel/task_work.c:179 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x644/0x2150 kernel/exit.c:867 do_group_exit+0x1fd/0x2b0 kernel/exit.c:1012 __do_sys_exit_group kernel/exit.c:1023 [inline] __se_sys_exit_group kernel/exit.c:1021 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1021 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f222648c0c9 Code: Unable to access opcode bytes at 0x7f222648c09f. RSP: 002b:00007f2227244bb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f222648c0c9 RDX: 00007f22264f1f7a RSI: 0000000000000000 RDI: 000000000000000b RBP: 000000000000000b R08: 0000000000000010 R09: 0000000000000004 R10: 00007ffdcb5e8080 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdcb4825cf R14: 00007f2227245300 R15: 0000000000022000 ---------------- Code disassembly (best guess): 0: 81 8b f6 ff 90 53 48 orl $0x48fb8948,0x5390fff6(%rbx) 7: 89 fb 48 a: 83 c7 18 add $0x18,%edi d: 48 8b 74 24 08 mov 0x8(%rsp),%rsi 12: e8 2e 3d 9d f6 callq 0xf69d3d45 17: 48 89 df mov %rbx,%rdi 1a: e8 06 95 9e f6 callq 0xf69e9525 1f: e8 b1 13 c5 f6 callq 0xf6c513d5 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 f6 db 90 f6 callq 0xf690dc25 <-- trapping instruction 2f: 65 8b 05 07 1e 34 75 mov %gs:0x75341e07(%rip),%eax # 0x75341e3d 36: 85 c0 test %eax,%eax 38: 74 02 je 0x3c 3a: 5b pop %rbx 3b: c3 retq 3c: e8 .byte 0xe8 3d: e4 13 in $0x13,%al 3f: 31 .byte 0x31