================================ WARNING: inconsistent lock state 5.19.0-rc4-syzkaller-00014-g941e3e791269 #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor389/3631 [HC1[1]:SC0[0]:HE0:SE1] takes: ffffffff8d313c38 (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:399 [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+0x3d4/0x500 fs/seq_file.c:162 vfs_read+0x2ea/0xd10 fs/read_write.c:480 ksys_read+0x19b/0x2c0 fs/read_write.c:620 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+0x46/0xb0 irq event stamp: 5504 hardirqs last enabled at (5503): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (5503): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 hardirqs last disabled at (5504): [] sysvec_irq_work+0xa/0xb0 arch/x86/kernel/irq_work.c:17 softirqs last enabled at (5370): [] spin_unlock_bh include/linux/spinlock.h:394 [inline] softirqs last enabled at (5370): [] __tun_set_ebpf+0x102/0x1a0 drivers/net/tun.c:2266 softirqs last disabled at (5368): [] spin_lock_bh include/linux/spinlock.h:354 [inline] softirqs last disabled at (5368): [] __tun_set_ebpf+0xa3/0x1a0 drivers/net/tun.c:2262 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-executor389/3631. stack backtrace: CPU: 0 PID: 3631 Comm: syz-executor389 Not tainted 5.19.0-rc4-syzkaller-00014-g941e3e791269 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 mark_lock_irq+0xb20/0xf00 mark_lock+0x21c/0x350 kernel/locking/lockdep.c:4632 mark_usage kernel/locking/lockdep.c:4524 [inline] __lock_acquire+0xb43/0x1f80 kernel/locking/lockdep.c:5007 lock_acquire+0x1a7/0x400 kernel/locking/lockdep.c:5665 __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+0x1b/0x20 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: f1 10 f7 ff 90 53 48 89 fb 48 83 c7 18 48 8b 74 24 08 e8 2e cb 33 f7 48 89 df e8 36 3c 35 f7 e8 e1 11 5a f7 fb bf 01 00 00 00 46 ed 27 f7 65 8b 05 47 57 ce 75 85 c0 74 02 5b c3 e8 ec 40 cc RSP: 0018:ffffc9000318fce0 EFLAGS: 00000282 RAX: 1b9ea956863ed900 RBX: ffff88801e0efe50 RCX: ffffffff91540e03 RDX: dffffc0000000000 RSI: ffffffff8a8d22c0 RDI: 0000000000000001 RBP: ffff8880219d443c R08: dffffc0000000000 R09: ffffed1003c1dfcb R10: ffffed1003c1dfcb R11: 1ffff11003c1dfca R12: ffff88801e0efe40 R13: ffff8880219d4400 R14: dffffc0000000000 R15: ffff88801e0efe00 spin_unlock_irq include/linux/spinlock.h:399 [inline] sw_sync_debugfs_release+0x14d/0x1d0 drivers/dma-buf/sw_sync.c:321 __fput+0x3b9/0x820 fs/file_table.c:317 task_work_run+0x146/0x1c0 kernel/task_work.c:177 ptrace_notify+0x29a/0x340 kernel/signal.c:2353 ptrace_report_syscall include/linux/ptrace.h:420 [inline] ptrace_report_syscall_exit include/linux/ptrace.h:482 [inline] syscall_exit_work+0x8c/0xe0 kernel/entry/common.c:249 syscall_exit_to_user_mode_prepare+0x62/0x80 kernel/entry/common.c:276 __syscall_exit_to_user_mode_work kernel/entry/common.c:281 [inline] syscall_exit_to_user_mode+0xa/0x60 kernel/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x46/0xb0 RIP: 0033:0x7fb1818587e9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 a1 15 00 00 90 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb1817e52f8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 RAX: 0000000000000000 RBX: 00007fb1818e1510 RCX: 00007fb1818587e9 RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000000000000003 RBP: 00007fb1818e151c R08 ---------------- Code disassembly (best guess): 0: f1 icebp 1: 10 f7 adc %dh,%bh 3: ff 90 53 48 89 fb callq *-0x476b7ad(%rax) 9: 48 83 c7 18 add $0x18,%rdi d: 48 8b 74 24 08 mov 0x8(%rsp),%rsi 12: e8 2e cb 33 f7 callq 0xf733cb45 17: 48 89 df mov %rbx,%rdi 1a: e8 36 3c 35 f7 callq 0xf7353c55 1f: e8 e1 11 5a f7 callq 0xf75a1205 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 46 ed 27 f7 callq 0xf727ed75 <-- trapping instruction 2f: 65 8b 05 47 57 ce 75 mov %gs:0x75ce5747(%rip),%eax # 0x75ce577d 36: 85 c0 test %eax,%eax 38: 74 02 je 0x3c 3a: 5b pop %rbx 3b: c3 retq 3c: e8 .byte 0xe8 3d: ec in (%dx),%al 3e: 40 cc rex int3