ci starts bisection 2023-05-31 05:21:25.574406159 +0000 UTC m=+33860.371684454 bisecting fixing commit since 200e340f2196d7fd427a5810d06e893b932f145a building syzkaller on 1c9013acc70de325dbb554c8c40c17ed02eff33f ensuring issue is reproducible on original commit 200e340f2196d7fd427a5810d06e893b932f145a testing commit 200e340f2196d7fd427a5810d06e893b932f145a gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 5bac26fbf3e397be5cb0820022135db878aff8a11fb923f790b72972cf723278 all runs: crashed: inconsistent lock state in sync_timeline_debug_remove testing current HEAD 48b1320a674e1ff5de2fad8606bee38f724594dc testing commit 48b1320a674e1ff5de2fad8606bee38f724594dc gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 0fb2f0cd184af6f3cde33fbd8485eb990711b1042330a946bf8a3f70a0497038 all runs: crashed: inconsistent lock state in sync_timeline_debug_remove crash still not fixed/happens on the oldest tested release revisions tested: 2, total time: 20m59.418444544s (build: 13m23.455247928s, test: 6m39.851656656s) crash still not fixed on HEAD or HEAD had kernel test errors commit msg: Merge tag 'for-6.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux crash: inconsistent lock state in sync_timeline_debug_remove ================================ WARNING: inconsistent lock state 6.4.0-rc4-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.0/5314 [HC1[1]:SC0[0]:HE0:SE1] takes: ffffffff8bd41218 (sync_timeline_list_lock){?.+.}-{2:2}, at: sync_timeline_debug_remove+0x19/0x180 drivers/dma-buf/sync_debug.c:31 {HARDIRQ-ON-W} state was registered at: __trace_hardirqs_on_caller kernel/locking/lockdep.c:4270 [inline] lockdep_hardirqs_on_prepare kernel/locking/lockdep.c:4337 [inline] lockdep_hardirqs_on_prepare+0x135/0x400 kernel/locking/lockdep.c:4289 trace_hardirqs_on+0x32/0x40 kernel/trace/trace_preemptirq.c:61 __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+0xd4/0x1d0 drivers/dma-buf/sync_debug.c:153 seq_read_iter+0x3fa/0x10e0 fs/seq_file.c:230 seq_read+0x161/0x200 fs/seq_file.c:162 vfs_read+0x16b/0x7b0 fs/read_write.c:468 ksys_read+0xee/0x1c0 fs/read_write.c:613 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd irq event stamp: 5844 hardirqs last enabled at (5843): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (5843): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 hardirqs last disabled at (5844): [] sysvec_irq_work+0xb/0xc0 arch/x86/kernel/irq_work.c:17 softirqs last enabled at (0): [] copy_process+0x1e99/0x6c40 kernel/fork.c:2452 softirqs last disabled at (0): [<0000000000000000>] 0x0 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.0/5314. stack backtrace: CPU: 0 PID: 5314 Comm: syz-executor.0 Not tainted 6.4.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x60/0xa0 lib/dump_stack.c:106 print_usage_bug kernel/locking/lockdep.c:3949 [inline] valid_state kernel/locking/lockdep.c:3991 [inline] mark_lock_irq kernel/locking/lockdep.c:4194 [inline] mark_lock.part.0+0x1110/0x1970 kernel/locking/lockdep.c:4656 mark_lock kernel/locking/lockdep.c:4620 [inline] mark_usage kernel/locking/lockdep.c:4542 [inline] __lock_acquire+0x16e5/0x5f30 kernel/locking/lockdep.c:5042 lock_acquire kernel/locking/lockdep.c:5705 [inline] lock_acquire+0x1ad/0x520 kernel/locking/lockdep.c:5670 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162 sync_timeline_debug_remove+0x19/0x180 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+0x1f6/0x2c0 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+0x170/0x240 drivers/dma-buf/dma-fence-array.c:120 irq_work_single+0x106/0x210 kernel/irq_work.c:221 irq_work_run_list kernel/irq_work.c:252 [inline] irq_work_run_list+0x6a/0x90 kernel/irq_work.c:235 irq_work_run+0x4f/0xd0 kernel/irq_work.c:261 __sysvec_irq_work+0x95/0x2d0 arch/x86/kernel/irq_work.c:22 sysvec_irq_work+0x8e/0xc0 arch/x86/kernel/irq_work.c:17 asm_sysvec_irq_work+0x16/0x20 arch/x86/include/asm/idtentry.h:671 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: 0f 1f 44 00 00 55 48 8b 74 24 08 48 89 fd 48 83 c7 18 e8 0e 5b 81 f8 48 89 ef e8 d6 c8 81 f8 e8 51 33 a1 f8 fb bf 01 00 00 00 c6 ae 73 f8 65 8b 05 17 b5 2b 77 85 c0 74 02 5d c3 e8 84 78 28 RSP: 0018:ffffc900031f7aa0 EFLAGS: 00000202 RAX: 00000000000016d3 RBX: ffff88802a156700 RCX: 1ffffffff19eb891 RDX: 0000000000000000 RSI: ffffffff890bf040 RDI: 0000000000000001 RBP: ffff88802a156750 R08: 0000000000000001 R09: 0000000000000001 R10: fffffbfff19ebea2 R11: 0000000000000010 R12: dffffc0000000000 R13: ffff88802a156700 R14: ffff88802a156750 R15: ffff888079dbc430 spin_unlock_irq include/linux/spinlock.h:400 [inline] sw_sync_debugfs_release+0x134/0x1e0 drivers/dma-buf/sw_sync.c:321 __fput+0x1fa/0x9a0 fs/file_table.c:321 task_work_run+0x12b/0x220 kernel/task_work.c:179 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x924/0x2470 kernel/exit.c:871 do_group_exit+0xb0/0x250 kernel/exit.c:1021 get_signal+0x1d26/0x1f90 kernel/signal.c:2874 arch_do_signal_or_restart+0x75/0x5b0 arch/x86/kernel/signal.c:306 exit_to_user_mode_loop kernel/entry/common.c:168 [inline] exit_to_user_mode_prepare+0x11f/0x240 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:297 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f6e2ea89209 Code: Unable to access opcode bytes at 0x7f6e2ea891df. RSP: 002b:00007f6e2fc07218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: 0000000000000001 RBX: 00007f6e2eb9bf68 RCX: 00007f6e2ea89209 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f6e2eb9bf6c RBP: 00007f6e2eb9bf60 R08: 00007ffc61367080 R09: 0000000000000000 R10: 0000000000000008 R11: 0000000000000246 R12: 00007f6e2eb9bf6c R13: 00007ffc613200af R14: 00007f6e2fc07300 R15: 0000000000022000 ---------------- Code disassembly (best guess): 0: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 5: 55 push %rbp 6: 48 8b 74 24 08 mov 0x8(%rsp),%rsi b: 48 89 fd mov %rdi,%rbp e: 48 83 c7 18 add $0x18,%rdi 12: e8 0e 5b 81 f8 callq 0xf8815b25 17: 48 89 ef mov %rbp,%rdi 1a: e8 d6 c8 81 f8 callq 0xf881c8f5 1f: e8 51 33 a1 f8 callq 0xf8a13375 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 c6 ae 73 f8 callq 0xf873aef5 <-- trapping instruction 2f: 65 8b 05 17 b5 2b 77 mov %gs:0x772bb517(%rip),%eax # 0x772bb54d 36: 85 c0 test %eax,%eax 38: 74 02 je 0x3c 3a: 5d pop %rbp 3b: c3 retq 3c: e8 .byte 0xe8 3d: 84 78 28 test %bh,0x28(%rax)