ci starts bisection 2023-02-06 21:03:29.683484382 +0000 UTC m=+16118.295340491 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: 522658dfb0896a315d856bf07a1e69a6ff01befe98a997f2605827a0cfce8db3 all runs: crashed: inconsistent lock state in sync_timeline_debug_remove testing current HEAD d2d11f342b179f1894a901f143ec7c008caba43e testing commit d2d11f342b179f1894a901f143ec7c008caba43e gcc compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 9f98bcb931ac265db57ff3d7dc1a3c5e61973088dad37f2b43d4b8d6e217f993 all runs: crashed: inconsistent lock state in sync_timeline_debug_remove revisions tested: 2, total time: 21m9.691070602s (build: 13m34.531611607s, test: 6m46.89656731s) the crash still happens on HEAD commit msg: Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs crash: inconsistent lock state in sync_timeline_debug_remove ================================ WARNING: inconsistent lock state 6.2.0-rc7-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-executor.0/5541 [HC1[1]:SC0[0]:HE0:SE1] takes: ffffffff8bd20518 (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:4254 [inline] lockdep_hardirqs_on_prepare kernel/locking/lockdep.c:4321 [inline] lockdep_hardirqs_on_prepare+0x135/0x400 kernel/locking/lockdep.c:4273 trace_hardirqs_on+0x2d/0x180 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+0xd4/0x1d0 drivers/dma-buf/sync_debug.c:153 seq_read_iter+0x3fa/0x1090 fs/seq_file.c:230 seq_read+0x161/0x200 fs/seq_file.c:162 vfs_read+0x1b8/0x7c0 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: 7656 hardirqs last enabled at (7655): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (7655): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 hardirqs last disabled at (7656): [] sysvec_irq_work+0xb/0xc0 arch/x86/kernel/irq_work.c:17 softirqs last enabled at (6394): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last enabled at (6394): [] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 softirqs last disabled at (6387): [] invoke_softirq kernel/softirq.c:445 [inline] softirqs last disabled at (6387): [] __irq_exit_rcu+0x123/0x180 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.0/5541. stack backtrace: CPU: 0 PID: 5541 Comm: syz-executor.0 Not tainted 6.2.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x57/0x7d lib/dump_stack.c:106 print_usage_bug kernel/locking/lockdep.c:3963 [inline] valid_state kernel/locking/lockdep.c:3975 [inline] mark_lock_irq kernel/locking/lockdep.c:4178 [inline] mark_lock.part.0.cold+0x18/0xd8 kernel/locking/lockdep.c:4634 mark_lock kernel/locking/lockdep.c:4598 [inline] mark_usage kernel/locking/lockdep.c:4526 [inline] __lock_acquire+0x14a2/0x56d0 kernel/locking/lockdep.c:5009 lock_acquire kernel/locking/lockdep.c:5668 [inline] lock_acquire+0x1df/0x630 kernel/locking/lockdep.c:5633 __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:276 [inline] dma_fence_array_release+0x170/0x240 drivers/dma-buf/dma-fence-array.c:120 irq_work_single+0x106/0x210 kernel/irq_work.c:211 irq_work_run_list kernel/irq_work.c:242 [inline] irq_work_run_list+0x6a/0x90 kernel/irq_work.c:225 irq_work_run+0x4f/0xd0 kernel/irq_work.c:251 __sysvec_irq_work+0xca/0x4d0 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: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: 0f 1f 44 00 00 55 48 8b 74 24 08 48 89 fd 48 83 c7 18 e8 8e bb 7f f8 48 89 ef e8 d6 27 80 f8 e8 41 c5 9e f8 fb bf 01 00 00 00 56 9b 72 f8 65 8b 05 97 cd 2b 77 85 c0 74 02 5d c3 e8 44 98 28 RSP: 0018:ffffc9000338faa0 EFLAGS: 00000206 RAX: 0000000000001de7 RBX: ffff888029755300 RCX: 1ffffffff19e2f99 RDX: 0000000000000000 RSI: ffffffff890bda80 RDI: 0000000000000001 RBP: ffff888029755350 R08: 0000000000000001 R09: 0000000000000001 R10: ffffed10052eaa6a R11: 0000000000000000 R12: dffffc0000000000 R13: ffff888029755300 R14: ffff888029755350 R15: ffff88802105b230 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:320 task_work_run+0x12b/0x220 kernel/task_work.c:179 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x90e/0x2460 kernel/exit.c:867 do_group_exit+0xb0/0x250 kernel/exit.c:1012 get_signal+0x1c43/0x1e90 kernel/signal.c:2859 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+0x15f/0x250 kernel/entry/common.c:203 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:296 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f4a31a89209 Code: Unable to access opcode bytes at 0x7f4a31a891df. RSP: 002b:00007f4a32b96218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007f4a31b9bf68 RCX: 00007f4a31a89209 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f4a31b9bf68 RBP: 00007f4a31b9bf60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f4a31b9bf6c R13: 00007ffcd81ffb8f R14: 00007f4a32b96300 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 8e bb 7f f8 callq 0xf87fbba5 17: 48 89 ef mov %rbp,%rdi 1a: e8 d6 27 80 f8 callq 0xf88027f5 1f: e8 41 c5 9e f8 callq 0xf89ec565 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 56 9b 72 f8 callq 0xf8729b85 <-- trapping instruction 2f: 65 8b 05 97 cd 2b 77 mov %gs:0x772bcd97(%rip),%eax # 0x772bcdcd 36: 85 c0 test %eax,%eax 38: 74 02 je 0x3c 3a: 5d pop %rbp 3b: c3 retq 3c: e8 .byte 0xe8 3d: 44 98 rex.R cwtl 3f: 28 .byte 0x28