[v6.1] inconsistent lock state in sync_timeline_debug_remove (2)

0 views
Skip to first unread message

syzbot

unread,
May 2, 2024, 1:11:30 AM5/2/24
Hello,

syzbot found the following issue on:

HEAD commit: dcbc050cb0d3 Linux 6.1.89
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13f342f8980000
kernel config: https://syzkaller.appspot.com/x/.config?x=64d62dbbe99e136b
dashboard link: https://syzkaller.appspot.com/bug?extid=2c3cdceca68d5c7e70f3
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/2f2d9a291fdb/disk-dcbc050c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/5ecf467e0c49/vmlinux-dcbc050c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/78f74d050dba/Image-dcbc050c.gz.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: [email protected]

================================
WARNING: inconsistent lock state
6.1.89-syzkaller #0 Not tainted
--------------------------------
inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
syz-executor.4/5591 [HC1[1]:SC0[0]:HE0:SE1] takes:
ffff800016eac798 (sync_timeline_list_lock){?.+.}-{2:2}, at: sync_timeline_debug_remove+0x38/0x130 drivers/dma-buf/sync_debug.c:31
{HARDIRQ-ON-W} state was registered at:
trace_hardirqs_on+0x184/0x2d4 kernel/trace/trace_preemptirq.c:49
__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline]
_raw_spin_unlock_irq+0x3c/0x90 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+0x16c/0x464 drivers/dma-buf/sync_debug.c:153
seq_read_iter+0x3e0/0xc44 fs/seq_file.c:230
seq_read+0x1e8/0x2c0 fs/seq_file.c:162
do_iter_read+0x41c/0x998 fs/read_write.c:798
vfs_readv fs/read_write.c:916 [inline]
do_preadv+0x1e4/0x324 fs/read_write.c:1008
__do_sys_preadv fs/read_write.c:1058 [inline]
__se_sys_preadv fs/read_write.c:1053 [inline]
__arm64_sys_preadv+0xa0/0xb8 fs/read_write.c:1053
__invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
invoke_syscall+0x98/0x2c0 arch/arm64/kernel/syscall.c:52
el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
do_el0_svc+0x64/0x218 arch/arm64/kernel/syscall.c:206
el0_svc+0x58/0x168 arch/arm64/kernel/entry-common.c:637
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585
irq event stamp: 218
hardirqs last enabled at (217): [<ffff80001224167c>] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline]
hardirqs last enabled at (217): [<ffff80001224167c>] _raw_spin_unlock_irq+0x3c/0x90 kernel/locking/spinlock.c:202
hardirqs last disabled at (218): [<ffff80001215d684>] __el1_irq arch/arm64/kernel/entry-common.c:468 [inline]
hardirqs last disabled at (218): [<ffff80001215d684>] el1_interrupt+0x24/0x68 arch/arm64/kernel/entry-common.c:486
softirqs last enabled at (202): [<ffff800008020d7c>] softirq_handle_end kernel/softirq.c:414 [inline]
softirqs last enabled at (202): [<ffff800008020d7c>] __do_softirq+0xc1c/0xe38 kernel/softirq.c:600
softirqs last disabled at (101): [<ffff80000802a99c>] ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:80

other info that might help us debug this:
Possible unsafe locking scenario:

CPU0
----
lock(sync_timeline_list_lock);
<Interrupt>
lock(sync_timeline_list_lock);

*** DEADLOCK ***

no locks held by syz-executor.4/5591.

stack backtrace:
CPU: 1 PID: 5591 Comm: syz-executor.4 Not tainted 6.1.89-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
Call trace:
dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158
show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106
dump_stack+0x1c/0x5c lib/dump_stack.c:113
print_usage_bug+0x654/0x9b0 kernel/locking/lockdep.c:3957
mark_lock_irq+0x980/0xd2c
mark_lock+0x258/0x360 kernel/locking/lockdep.c:4628
mark_usage kernel/locking/lockdep.c:4520 [inline]
__lock_acquire+0xb4c/0x7680 kernel/locking/lockdep.c:5003
lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5662
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x6c/0xb4 kernel/locking/spinlock.c:162
sync_timeline_debug_remove+0x38/0x130 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+0x1e8/0x270 drivers/dma-buf/sw_sync.c:144
dma_fence_release+0x1a4/0x5f8 drivers/dma-buf/dma-fence.c:560
kref_put include/linux/kref.h:65 [inline]
dma_fence_put include/linux/dma-fence.h:276 [inline]
dma_fence_array_release+0x11c/0x24c drivers/dma-buf/dma-fence-array.c:120
dma_fence_release+0x1a4/0x5f8 drivers/dma-buf/dma-fence.c:560
kref_put include/linux/kref.h:65 [inline]
dma_fence_put include/linux/dma-fence.h:276 [inline]
irq_dma_fence_array_work+0xa0/0x13c drivers/dma-buf/dma-fence-array.c:52
irq_work_single+0xbc/0x1d4 kernel/irq_work.c:211
irq_work_run_list kernel/irq_work.c:242 [inline]
irq_work_run+0x108/0x25c kernel/irq_work.c:251
do_handle_IPI arch/arm64/kernel/smp.c:899 [inline]
ipi_handler+0x108/0x86c arch/arm64/kernel/smp.c:922
handle_percpu_devid_irq+0x174/0x354 kernel/irq/chip.c:930
generic_handle_irq_desc include/linux/irqdesc.h:158 [inline]
handle_irq_desc kernel/irq/irqdesc.c:651 [inline]
generic_handle_domain_irq+0x7c/0xc4 kernel/irq/irqdesc.c:707
__gic_handle_irq drivers/irqchip/irq-gic-v3.c:737 [inline]
__gic_handle_irq_from_irqson drivers/irqchip/irq-gic-v3.c:788 [inline]
gic_handle_irq+0x70/0x1e4 drivers/irqchip/irq-gic-v3.c:832
call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:893
do_interrupt_handler+0xd4/0x138 arch/arm64/kernel/entry-common.c:274
__el1_irq arch/arm64/kernel/entry-common.c:471 [inline]
el1_interrupt+0x34/0x68 arch/arm64/kernel/entry-common.c:486
el1h_64_irq_handler+0x18/0x24 arch/arm64/kernel/entry-common.c:491
el1h_64_irq+0x64/0x68 arch/arm64/kernel/entry.S:581
arch_local_irq_enable arch/arm64/include/asm/irqflags.h:35 [inline]
__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline]
_raw_spin_unlock_irq+0x44/0x90 kernel/locking/spinlock.c:202
spin_unlock_irq include/linux/spinlock.h:401 [inline]
sw_sync_debugfs_release+0x134/0x1f0 drivers/dma-buf/sw_sync.c:321
__fput+0x30c/0x7bc fs/file_table.c:320
____fput+0x20/0x30 fs/file_table.c:348
task_work_run+0x240/0x2f0 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
do_notify_resume+0x2148/0x3474 arch/arm64/kernel/signal.c:1132
prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline]
exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline]
el0_svc+0x9c/0x168 arch/arm64/kernel/entry-common.c:638
el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at [email protected].

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Aug 23, 2024, 5:25:17 AM8/23/24
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages